(t *testing.T)
| 100 | } |
| 101 | |
| 102 | func TestStats_AddFetchedDataBytes(t *testing.T) { |
| 103 | t.Parallel() |
| 104 | t.Run("add and load bytes", func(t *testing.T) { |
| 105 | stats, _ := ContextWithEmptyStats(context.Background()) |
| 106 | stats.AddFetchedDataBytes(4096) |
| 107 | stats.AddFetchedDataBytes(4096) |
| 108 | |
| 109 | assert.Equal(t, uint64(8192), stats.LoadFetchedDataBytes()) |
| 110 | }) |
| 111 | |
| 112 | t.Run("add and load bytes nil receiver", func(t *testing.T) { |
| 113 | var stats *QueryStats |
| 114 | stats.AddFetchedDataBytes(1024) |
| 115 | |
| 116 | assert.Equal(t, uint64(0), stats.LoadFetchedDataBytes()) |
| 117 | }) |
| 118 | } |
| 119 | |
| 120 | func TestStats_AddFetchedChunks(t *testing.T) { |
| 121 | t.Parallel() |
nothing calls this directly
no test coverage detected