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

Function BenchmarkReadAllTraces

tempodb/encoding/vparquet5/block_traceql_test.go:1861–1882  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

1859}
1860
1861func BenchmarkReadAllTraces(b *testing.B) {
1862 var (
1863 ctx = b.Context()
1864 block = blockForBenchmarks(b)
1865 pool = newRowPool(1_000_000)
1866 )
1867
1868 iter, err := block.rawIter(ctx, pool)
1869 require.NoError(b, err)
1870
1871 for b.Loop() {
1872 for {
1873 id, row, err := iter.Next(ctx)
1874 require.NoError(b, err)
1875 if id == nil {
1876 break
1877 }
1878 require.NotNil(b, row)
1879 pool.Put(row)
1880 }
1881 }
1882}
1883
1884func BenchmarkReadSingleTrace(b *testing.B) {
1885 var (

Callers

nothing calls this directly

Calls 7

LoopMethod · 0.80
blockForBenchmarksFunction · 0.70
newRowPoolFunction · 0.70
ContextMethod · 0.65
NextMethod · 0.65
rawIterMethod · 0.45
PutMethod · 0.45

Tested by

no test coverage detected