(t *testing.T)
| 64 | } |
| 65 | |
| 66 | func TestQueryStats_AddExtraFields(t *testing.T) { |
| 67 | t.Parallel() |
| 68 | t.Run("add and load extra fields", func(t *testing.T) { |
| 69 | stats, _ := ContextWithEmptyStats(context.Background()) |
| 70 | stats.AddExtraFields("a", "b") |
| 71 | stats.AddExtraFields("c") |
| 72 | |
| 73 | checkExtraFields(t, []any{"a", "b", "c", ""}, stats.LoadExtraFields()) |
| 74 | }) |
| 75 | |
| 76 | t.Run("add and load extra fields nil receiver", func(t *testing.T) { |
| 77 | var stats *QueryStats |
| 78 | stats.AddExtraFields("a", "b") |
| 79 | |
| 80 | checkExtraFields(t, []any{}, stats.LoadExtraFields()) |
| 81 | }) |
| 82 | } |
| 83 | |
| 84 | func TestStats_AddFetchedChunkBytes(t *testing.T) { |
| 85 | t.Parallel() |
nothing calls this directly
no test coverage detected