Codebase list golang-github-vbauerster-mpb / 7f6ee5d
account zDur on math.IsInf or math.IsNaN Vladimir Bauer 2 years ago
2 changed file(s) with 2 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
8383 } else {
8484 durPerItem := float64(d.zDur+dur) / float64(n)
8585 if math.IsInf(durPerItem, 0) || math.IsNaN(durPerItem) {
86 d.zDur += dur
8687 return
8788 }
8889 d.zDur = 0
9898 } else {
9999 durPerByte := float64(d.zDur+dur) / float64(n)
100100 if math.IsInf(durPerByte, 0) || math.IsNaN(durPerByte) {
101 d.zDur += dur
101102 return
102103 }
103104 d.zDur = 0