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

Function BenchmarkFullPoller

tempodb/blocklist/poller_test.go:1151–1278  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

1149}
1150
1151func BenchmarkFullPoller(b *testing.B) {
1152 cases := []struct {
1153 name string
1154 tenants int
1155 blocksPerTenant int
1156 iterations int
1157 blocksPer int
1158 compactionsPer int
1159 }{
1160 {
1161 name: "no tenants",
1162 },
1163 {
1164 name: "single tenant",
1165 tenants: 1,
1166 blocksPerTenant: 1000,
1167 },
1168 {
1169 name: "multi tenant",
1170 tenants: 10,
1171 blocksPerTenant: 1000,
1172 },
1173 {
1174 name: "multi tenant growth",
1175 tenants: 10,
1176 blocksPerTenant: 1000,
1177 iterations: 10,
1178 blocksPer: 100,
1179 },
1180 {
1181 name: "multi tenant growth and compactions",
1182 tenants: 10,
1183 blocksPerTenant: 1000,
1184 iterations: 10,
1185 blocksPer: 100,
1186 compactionsPer: 10,
1187 },
1188 }
1189
1190 for _, bc := range cases {
1191 b.Run(fmt.Sprintf("%sTenants%dBlocks%dGrow%dCompactions%d", bc.name, bc.tenants, bc.blocksPerTenant, bc.blocksPer, bc.compactionsPer), func(b *testing.B) {
1192 s := &mockJobSharder{owns: true}
1193
1194 d := b.TempDir()
1195 defer os.RemoveAll(d)
1196
1197 rr, ww, cc, err := local.New(&local.Config{
1198 Path: d,
1199 })
1200 require.NoError(b, err)
1201
1202 var (
1203 ctx = context.Background()
1204 r = backend.NewReader(rr)
1205 w = backend.NewWriter(ww)
1206 // c = backend.NewCompactor(cc)
1207 )
1208

Callers

nothing calls this directly

Calls 10

DoMethod · 0.95
NewFunction · 0.92
NewReaderFunction · 0.92
NewWriterFunction · 0.92
NewPollerFunction · 0.85
writeNewBlocksForTenantFunction · 0.85
ApplyPollResultsMethod · 0.80
NewFunction · 0.70
MarkBlockCompactedMethod · 0.65
RunMethod · 0.45

Tested by

no test coverage detected