(b *testing.B)
| 1882 | } |
| 1883 | |
| 1884 | func BenchmarkReadSingleTrace(b *testing.B) { |
| 1885 | var ( |
| 1886 | ctx = b.Context() |
| 1887 | opts = common.DefaultSearchOptions() |
| 1888 | block = blockForBenchmarks(b) |
| 1889 | ) |
| 1890 | |
| 1891 | // Get a trace ID from the first page. |
| 1892 | pf, _, err := block.openForSearch(ctx, opts) |
| 1893 | require.NoError(b, err) |
| 1894 | index, err := pf.RowGroups()[0].ColumnChunks()[0].ColumnIndex() |
| 1895 | require.NoError(b, err) |
| 1896 | id := index.MaxValue(0).ByteArray() |
| 1897 | require.NotNil(b, id) |
| 1898 | |
| 1899 | for b.Loop() { |
| 1900 | tr, err := block.FindTraceByID(ctx, id, opts) |
| 1901 | require.NoError(b, err) |
| 1902 | require.NotNil(b, tr) |
| 1903 | } |
| 1904 | } |
| 1905 | |
| 1906 | func TestSamplingError(t *testing.T) { |
| 1907 | // Comment this out to run tests when developing. |
nothing calls this directly
no test coverage detected