(b *testing.B)
| 1859 | } |
| 1860 | |
| 1861 | func 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 | |
| 1884 | func BenchmarkReadSingleTrace(b *testing.B) { |
| 1885 | var ( |
nothing calls this directly
no test coverage detected