diff --git a/src/go/mongolib/stats/stats.go b/src/go/mongolib/stats/stats.go index 2f84147e..0534b029 100644 --- a/src/go/mongolib/stats/stats.go +++ b/src/go/mongolib/stats/stats.go @@ -293,6 +293,7 @@ func countersToStats(query QueryInfoAndCounters, uptime int64, tc totalCounters) func aggregateCounters(queries []QueryInfoAndCounters) QueryInfoAndCounters { qt := QueryInfoAndCounters{} for _, query := range queries { + qt.Count += query.Count qt.NScanned = append(qt.NScanned, query.NScanned...) qt.NReturned = append(qt.NReturned, query.NReturned...) qt.QueryTime = append(qt.QueryTime, query.QueryTime...) diff --git a/src/go/tests/profiler_docs_total_stats.want.json b/src/go/tests/profiler_docs_total_stats.want.json index 7bcdfeb0..3a06993d 100755 --- a/src/go/tests/profiler_docs_total_stats.want.json +++ b/src/go/tests/profiler_docs_total_stats.want.json @@ -6,7 +6,7 @@ "Fingerprint": "", "FirstSeen": "0001-01-01T00:00:00Z", "LastSeen": "0001-01-01T00:00:00Z", - "Count": 0, + "Count": 3, "QPS": 0, "Rank": 0, "Ratio": 134.33333333333334,