Avoid spurious division by zero when fast servers (e.g. uv) are fast
This commit is contained in:
parent
38831969be
commit
855bbf77b8
|
@ -118,7 +118,7 @@
|
|||
(/ elapsed-sec count))))
|
||||
(write-logbook-datum! Tping (list (connection-count)
|
||||
roundtrip-latency
|
||||
(/ 1.0 roundtrip-latency)
|
||||
(if (zero? roundtrip-latency) 0 (/ 1.0 roundtrip-latency))
|
||||
count
|
||||
elapsed-sec)))))))
|
||||
|
||||
|
@ -142,7 +142,7 @@
|
|||
(define gc-sec (/ gc-time 1000.0))
|
||||
(write-logbook-datum! Tgrowth (list old-count
|
||||
(/ wallclock-sec (- waypoint old-count))
|
||||
(/ (- waypoint old-count) wallclock-sec)
|
||||
(if (zero? wallclock-sec) 0 (/ (- waypoint old-count) wallclock-sec))
|
||||
cpu+gc-sec
|
||||
wallclock-sec
|
||||
gc-sec
|
||||
|
|
Loading…
Reference in New Issue