From 0bb73474d50c292e14c0f049c1d776401e7e2d97 Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Sun, 27 Nov 2016 08:02:39 +0100 Subject: [PATCH] src/daemon/utils_match.[ch]: Rename UTILS_MATCH_CF_GAUGE_LATENCY to UTILS_MATCH_CF_GAUGE_DIST. --- src/daemon/utils_match.c | 4 ++-- src/daemon/utils_match.h | 2 +- src/daemon/utils_tail_match.c | 2 +- src/tail.c | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/daemon/utils_match.c b/src/daemon/utils_match.c index 98d93116..d1be244e 100644 --- a/src/daemon/utils_match.c +++ b/src/daemon/utils_match.c @@ -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) diff --git a/src/daemon/utils_match.h b/src/daemon/utils_match.h index c44bce09..7b263d77 100644 --- a/src/daemon/utils_match.h +++ b/src/daemon/utils_match.h @@ -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 diff --git a/src/daemon/utils_tail_match.c b/src/daemon/utils_tail_match.c index b52a319b..a0cbc11d 100644 --- a/src/daemon/utils_tail_match.c +++ b/src/daemon/utils_tail_match.c @@ -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) diff --git a/src/tail.c b/src/tail.c index c1e55621..ff76b725 100644 --- a/src/tail.c +++ b/src/tail.c @@ -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) -- 2.30.2