From: Florian Forster Date: Wed, 9 Apr 2008 08:44:58 +0000 (+0200) Subject: ascent plugin: Store latency in seconds, not milli seconds. X-Git-Tag: collectd-4.4.0~43^2~1 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=c85466b2c433875d6bcc4568535f7cb56ef77e5c;p=collectd.git ascent plugin: Store latency in seconds, not milli seconds. --- diff --git a/src/ascent.c b/src/ascent.c index 75d5cb61..94691d6b 100644 --- a/src/ascent.c +++ b/src/ascent.c @@ -193,11 +193,12 @@ static int ascent_submit_players (player_stats_t *ps) /* {{{ */ value = ((double) ps->level_sum) / ((double) ps->level_num); ascent_submit_gauge (NULL, "gauge", "avg-level", value); + /* Latency is in ms, but we store seconds. */ if (ps->latency_num <= 0) value = NAN; else - value = ((double) ps->latency_sum) / ((double) ps->latency_num); - ascent_submit_gauge (NULL, "gauge", "avg-latency", value); + value = ((double) ps->latency_sum) / (1000.0 * ((double) ps->latency_num)); + ascent_submit_gauge (NULL, "latency", "average", value); return (0); } /* }}} int ascent_submit_players */