MCPcopy
hub / github.com/grafana/tempo / newPerTenant

Function newPerTenant

tempodb/blocklist/poller_test.go:1335–1350  ·  view source on GitHub ↗
(tenantCount, blockCount int)

Source from the content-addressed store, hash-verified

1333}
1334
1335func newPerTenant(tenantCount, blockCount int) PerTenant {
1336 var (
1337 perTenant = make(PerTenant, tenantCount)
1338 metas []*backend.BlockMeta
1339 id string
1340 tenant string
1341 )
1342 for i := 0; i < tenantCount; i++ {
1343 tenant = fmt.Sprintf("tenant-%d", i)
1344 metas = newBlockMetas(blockCount, tenant)
1345 id = randString(5)
1346 perTenant[id] = metas
1347 }
1348
1349 return perTenant
1350}
1351
1352func newPerTenantCompacted(tenantCount, blockCount int) PerTenantCompacted {
1353 perTenantCompacted := make(PerTenantCompacted)

Callers 1

BenchmarkPoller10kFunction · 0.85

Calls 2

newBlockMetasFunction · 0.85
randStringFunction · 0.85

Tested by

no test coverage detected