@@ -800,17 +800,18 @@ func aggregateStats(stats []http.RequestStat) (int, *ddsketch.DDSketch) {
800800 latencies := emptySketch ()
801801
802802 for _ , stat := range stats {
803- requestCount += stat .Count
804803 if stat .Count == 0 {
805804 continue
806- } else if stat .Count == 1 {
805+ }
806+
807+ requestCount += stat .Count
808+
809+ if stat .Count == 1 {
807810 latencies .Add (stat .FirstLatencySample * nsToS )
808- } else {
809- if stat .Latencies != nil {
810- var scaled = emptySketch ()
811- scaled = stat .Latencies .ChangeMapping (scaled .IndexMapping , scaled .GetPositiveValueStore (), scaled .GetNegativeValueStore (), nsToS )
812- latencies .MergeWith (scaled )
813- }
811+ } else if stat .Latencies != nil {
812+ var scaled = emptySketch ()
813+ scaled = stat .Latencies .ChangeMapping (scaled .IndexMapping , scaled .GetPositiveValueStore (), scaled .GetNegativeValueStore (), nsToS )
814+ latencies .MergeWith (scaled )
814815 }
815816 }
816817 return requestCount , latencies
@@ -1024,9 +1025,6 @@ func aggregateHTTPStats(httpStats map[http.Key]*http.RequestStats, sendForPath b
10241025 }
10251026
10261027 statusCodeGroup := statusCodeClassToString (statusCodeClass )
1027- if statusCodeGroup == "" {
1028- continue
1029- }
10301028 connKey := getConnectionKeyForHTTPStats (statKey )
10311029 connStats := regroupedStats [connKey ]
10321030
0 commit comments