(t *testing.T)
| 82 | } |
| 83 | |
| 84 | func TestStats_AddFetchedChunkBytes(t *testing.T) { |
| 85 | t.Parallel() |
| 86 | t.Run("add and load bytes", func(t *testing.T) { |
| 87 | stats, _ := ContextWithEmptyStats(context.Background()) |
| 88 | stats.AddFetchedChunkBytes(4096) |
| 89 | stats.AddFetchedChunkBytes(4096) |
| 90 | |
| 91 | assert.Equal(t, uint64(8192), stats.LoadFetchedChunkBytes()) |
| 92 | }) |
| 93 | |
| 94 | t.Run("add and load bytes nil receiver", func(t *testing.T) { |
| 95 | var stats *QueryStats |
| 96 | stats.AddFetchedChunkBytes(1024) |
| 97 | |
| 98 | assert.Equal(t, uint64(0), stats.LoadFetchedChunkBytes()) |
| 99 | }) |
| 100 | } |
| 101 | |
| 102 | func TestStats_AddFetchedDataBytes(t *testing.T) { |
| 103 | t.Parallel() |
nothing calls this directly
no test coverage detected