MCPcopy Create free account
hub / github.com/devaccuracy/ledgerforge / configuredPrefixes

Function configuredPrefixes

tests/loadtest/tools/queue_benchmark.go:313–333  ·  view source on GitHub ↗
(cfg benchmarkConfig)

Source from the content-addressed store, hash-verified

311}
312
313func configuredPrefixes(cfg benchmarkConfig) []string {
314 prefixSet := make(map[string]struct{})
315
316 if prefix := strings.TrimSpace(cfg.queuePrefix); prefix != "" {
317 prefixSet[prefix] = struct{}{}
318 }
319
320 for _, raw := range strings.Split(cfg.queuePrefixes, ",") {
321 prefix := strings.TrimSpace(raw)
322 if prefix != "" {
323 prefixSet[prefix] = struct{}{}
324 }
325 }
326
327 prefixes := make([]string, 0, len(prefixSet))
328 for prefix := range prefixSet {
329 prefixes = append(prefixes, prefix)
330 }
331 sort.Strings(prefixes)
332 return prefixes
333}
334
335func hasWork(s snapshot) bool {
336 return s.pending+s.active+s.scheduled+s.retry+s.aggregating > 0

Callers 1

resolveQueueNamesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected