|
@@ -1292,6 +1292,18 @@ func (s *UrlMapping) subStatsFromClickhouse(wg *sync.WaitGroup, req *dto.UrlMapp
|
|
|
if item.Total > 0 {
|
|
|
item.ErrorRate = float64(row.ErrorNum) / float64(row.Total)
|
|
|
}
|
|
|
+ if math.IsNaN(row.AvgDuration) || math.IsInf(row.AvgDuration, 0) {
|
|
|
+ row.AvgDuration = 0
|
|
|
+ }
|
|
|
+ if math.IsNaN(row.P50Duration) || math.IsInf(row.P50Duration, 0) {
|
|
|
+ row.P50Duration = 0
|
|
|
+ }
|
|
|
+ if math.IsNaN(row.P90Duration) || math.IsInf(row.P90Duration, 0) {
|
|
|
+ row.P90Duration = 0
|
|
|
+ }
|
|
|
+ if math.IsNaN(row.P99Duration) || math.IsInf(row.P99Duration, 0) {
|
|
|
+ row.P99Duration = 0
|
|
|
+ }
|
|
|
item.ErrorNum = row.ErrorNum
|
|
|
item.DurationMax = row.MaxDuration
|
|
|
item.DurationAvg = row.AvgDuration
|