summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ddde85a)
raw | patch | inline | side by side (parent: ddde85a)
author | Aleksei Zakharov <zakharov.a.g@yandex.ru> | |
Thu, 19 Oct 2017 09:58:30 +0000 (09:58 +0000) | ||
committer | Aleksei Zakharov <zakharov.a.g@yandex.ru> | |
Thu, 19 Oct 2017 09:58:30 +0000 (09:58 +0000) |
src/ceph.c | patch | blob | history |
diff --git a/src/ceph.c b/src/ceph.c
index bfd95e829eed6b1cc4f82ed351de8aeb45c697e7..62acaf345bf9e5e85daba79ca11013d1a8ca51c4 100644 (file)
--- a/src/ceph.c
+++ b/src/ceph.c
size_t tmp_size = sizeof(tmp);
const char *cut_suffixes[] = {".type", ".avgcount", ".sum", ".avgtime"};
- /* The "avgtime" metric reports ("sum" / "avgcount"), i.e. the average time
- * per request since the start of the Ceph daemon. Report this only when the
- * user has configured "long running average". Otherwise, use the rate of
- * "sum" and "avgcount" to calculate the current latency.
- */
-
if (buffer == NULL || buffer_size == 0 || key_str == NULL ||
strlen(key_str) == 0)
return EINVAL;
uv.gauge = result;
vtmp->latency_index = (vtmp->latency_index + 1);
} else if (has_suffix(key, ".avgtime")) {
- // skip this step if no need in long run latency
+
+ /* The "avgtime" metric reports ("sum" / "avgcount"), i.e. the average
+ * time per request since the start of the Ceph daemon. Report this only
+ * when the user has configured "long running average". Otherwise, use the
+ * rate of "sum" and "avgcount" to calculate the current latency.
+ */
+
if (!long_run_latency_avg) {
return 0;
}