(t *testing.T)
| 118 | } |
| 119 | |
| 120 | func TestStats_AddFetchedChunks(t *testing.T) { |
| 121 | t.Parallel() |
| 122 | t.Run("add and load chunks", func(t *testing.T) { |
| 123 | stats, _ := ContextWithEmptyStats(context.Background()) |
| 124 | stats.AddFetchedChunks(4096) |
| 125 | stats.AddFetchedChunks(4096) |
| 126 | |
| 127 | assert.Equal(t, uint64(8192), stats.LoadFetchedChunks()) |
| 128 | }) |
| 129 | |
| 130 | t.Run("add and load chunks nil receiver", func(t *testing.T) { |
| 131 | var stats *QueryStats |
| 132 | stats.AddFetchedChunks(1024) |
| 133 | |
| 134 | assert.Equal(t, uint64(0), stats.LoadFetchedChunks()) |
| 135 | }) |
| 136 | } |
| 137 | |
| 138 | func TestStats_AddFetchedSamples(t *testing.T) { |
| 139 | t.Parallel() |
nothing calls this directly
no test coverage detected