920-fix-ping-droprate.patch 436 B

1234567891011
  1. --- a/src/ping.c
  2. +++ b/src/ping.c
  3. @@ -655,7 +655,7 @@ static int ping_read (void) /* {{{ */
  4. / ((double) (pkg_recv * (pkg_recv - 1))));
  5. /* Calculate drop rate. */
  6. - droprate = ((double) (pkg_sent - pkg_recv)) / ((double) pkg_sent);
  7. + droprate = ((double) (pkg_sent - pkg_recv)) * 100 / ((double) pkg_sent);
  8. submit (hl->host, "ping", latency_average);
  9. submit (hl->host, "ping_stddev", latency_stddev);