From c85466b2c433875d6bcc4568535f7cb56ef77e5c Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Wed, 9 Apr 2008 10:44:58 +0200 Subject: [PATCH] ascent plugin: Store latency in seconds, not milli seconds. --- src/ascent.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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 */ -- 2.30.2