]> git.ipfire.org Git - thirdparty/collectd.git/commitdiff
return constructor for derive
authorSvetlana Shmidt <sshmidt@google.com>
Tue, 15 Sep 2020 10:52:11 +0000 (10:52 +0000)
committerSvetlana Shmidt <sshmidt@google.com>
Tue, 15 Sep 2020 10:52:11 +0000 (10:52 +0000)
src/daemon/utils_cache.c

index a00c822385c093000b334c1a2b45952e8dda2177..a902612891e0ce20abc30255de78f61b5b0e8ae3 100644 (file)
@@ -161,9 +161,9 @@ static int uc_insert(metric_t const *m, char const *key) {
 
   case DS_TYPE_DERIVE:
     ce->values_gauge = NAN;
-    // ce->values_raw.derive = m->value.derive;
+    ce->values_raw = typed_value_create(m->value, METRIC_TYPE_COUNTER);
     ce->distribution_increase = NULL;
-    /* TODO: METRIC_TYPE_DERIVE? */
+    ce->start_value = typed_value_create(m->value, METRIC_TYPE_COUNTER);
     break;
 
   case DS_TYPE_DISTRIBUTION: