summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 60adf6d)
raw | patch | inline | side by side (parent: 60adf6d)
author | Florian Forster <octo@huhu.verplant.org> | |
Wed, 9 Apr 2008 08:44:58 +0000 (10:44 +0200) | ||
committer | Florian Forster <octo@huhu.verplant.org> | |
Wed, 9 Apr 2008 08:44:58 +0000 (10:44 +0200) |
src/ascent.c | patch | blob | history |
diff --git a/src/ascent.c b/src/ascent.c
index 75d5cb6159c98c82586b0d9d30399fd6e051ed1a..94691d6b08a545e4b72ffad26e09b775a5624db7 100644 (file)
--- a/src/ascent.c
+++ b/src/ascent.c
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 */