src/daemon/utils_match.[ch]: Rename UTILS_MATCH_CF_GAUGE_LATENCY to UTILS_MATCH_CF_GA...
authorFlorian Forster <octo@collectd.org>
Sun, 27 Nov 2016 07:02:39 +0000 (08:02 +0100)
committerFlorian Forster <octo@collectd.org>
Sun, 27 Nov 2016 07:02:39 +0000 (08:02 +0100)
src/daemon/utils_match.c
src/daemon/utils_match.h
src/daemon/utils_tail_match.c
src/tail.c

index 98d9311..d1be244 100644 (file)
@@ -99,7 +99,7 @@ static int default_callback (const char __attribute__((unused)) *str,
     if (matches[1] == endptr)
       return (-1);
 
-    if (data->ds_type & UTILS_MATCH_CF_GAUGE_LATENCY)
+    if (data->ds_type & UTILS_MATCH_CF_GAUGE_DIST)
     {
       latency_counter_add(data->latency, DOUBLE_TO_CDTIME_T(value));
       data->values_num++;
@@ -299,7 +299,7 @@ cu_match_t *match_create_simple (const char *regex,
   user_data->ds_type = match_ds_type;
 
   if ((match_ds_type & UTILS_MATCH_DS_TYPE_GAUGE)
-      && (match_ds_type & UTILS_MATCH_CF_GAUGE_LATENCY))
+      && (match_ds_type & UTILS_MATCH_CF_GAUGE_DIST))
   {
     user_data->latency = latency_counter_create();
     if (user_data->latency == NULL)
index c44bce0..7b263d7 100644 (file)
@@ -48,7 +48,7 @@
 #define UTILS_MATCH_CF_GAUGE_INC     0x10
 #define UTILS_MATCH_CF_GAUGE_ADD     0x20
 #define UTILS_MATCH_CF_GAUGE_PERSIST 0x40
-#define UTILS_MATCH_CF_GAUGE_LATENCY 0x80
+#define UTILS_MATCH_CF_GAUGE_DIST    0x80
 
 #define UTILS_MATCH_CF_COUNTER_SET   0x01
 #define UTILS_MATCH_CF_COUNTER_ADD   0x02
index b52a319..a0cbc11 100644 (file)
@@ -305,7 +305,7 @@ int tail_match_add_match_simple (cu_tail_match_t *obj,
   user_data->interval = interval;
 
   if ((ds_type & UTILS_MATCH_DS_TYPE_GAUGE)
-      && (ds_type & UTILS_MATCH_CF_GAUGE_LATENCY))
+      && (ds_type & UTILS_MATCH_CF_GAUGE_DIST))
   {
     status = latency_config_copy(&user_data->latency_config, latency_cfg);
     if (status != 0)
index c1e5562..ff76b72 100644 (file)
@@ -95,7 +95,7 @@ static int ctail_config_add_match_dstype (ctail_config_match_t *cm,
   }
   else if (strcasecmp ("Distribution", ds_type) == 0)
   {
-    cm->flags = UTILS_MATCH_DS_TYPE_GAUGE | UTILS_MATCH_CF_GAUGE_LATENCY;
+    cm->flags = UTILS_MATCH_DS_TYPE_GAUGE | UTILS_MATCH_CF_GAUGE_DIST;
 
     int status = latency_config (&cm->latency, ci, "tail");
     if (status != 0)