]> git.ipfire.org Git - thirdparty/collectd.git/commitdiff
src/daemon/utils_cache.c: Add comment about initializing `ce->values_gauge` for non... 4258/head
authorFlorian Forster <octo@collectd.org>
Mon, 29 Jan 2024 13:15:24 +0000 (14:15 +0100)
committerFlorian Forster <octo@collectd.org>
Mon, 29 Jan 2024 13:15:24 +0000 (14:15 +0100)
src/daemon/utils_cache.c

index 0045464e123efc6e031a14ebb15b7afdea4d1e18..ba4f1080dbf4092fcef7a2ccd7562e2346fd9942 100644 (file)
@@ -151,6 +151,8 @@ static int uc_insert(metric_t const *m, char const *key) {
   switch (m->family->type) {
   case DS_TYPE_COUNTER:
   case DS_TYPE_DERIVE:
+    // Non-gauge types will store the rate in values_gauge when the second data
+    // point is available. Initially, NAN signifies "not enough data".
     ce->values_gauge = NAN;
     break;