diff --git a/source/libs/monitorfw/src/taos_gauge.c b/source/libs/monitorfw/src/taos_gauge.c index 74d2665194..7793f4c464 100644 --- a/source/libs/monitorfw/src/taos_gauge.c +++ b/source/libs/monitorfw/src/taos_gauge.c @@ -38,7 +38,7 @@ int taos_gauge_destroy(taos_gauge_t *self) { self = NULL; return r; } - +/* int taos_gauge_inc(taos_gauge_t *self, const char **label_values) { TAOS_ASSERT(self != NULL); if (self == NULL) return 1; @@ -86,7 +86,7 @@ int taos_gauge_sub(taos_gauge_t *self, double r_value, const char **label_values if (sample == NULL) return 1; return taos_metric_sample_sub(sample, r_value); } - +*/ int taos_gauge_set(taos_gauge_t *self, double r_value, const char **label_values) { TAOS_ASSERT(self != NULL); if (self == NULL) return 1; diff --git a/source/libs/monitorfw/src/taos_metric_sample.c b/source/libs/monitorfw/src/taos_metric_sample.c index ca6ea30028..d32e6afdb2 100644 --- a/source/libs/monitorfw/src/taos_metric_sample.c +++ b/source/libs/monitorfw/src/taos_metric_sample.c @@ -91,6 +91,7 @@ int taos_metric_sample_add(taos_metric_sample_t *self, double r_value) { return 0; } +/* int taos_metric_sample_sub(taos_metric_sample_t *self, double r_value) { TAOS_ASSERT(self != NULL); if (self->type != TAOS_GAUGE) { @@ -99,7 +100,8 @@ int taos_metric_sample_sub(taos_metric_sample_t *self, double r_value) { } #ifdef C11_ATOMIC - /*_Atomic*/ double old = atomic_load(&self->r_value); + ///*_Atomic/ + double old = atomic_load(&self->r_value); for (;;) { _Atomic double new = ATOMIC_VAR_INIT(old - r_value); if (atomic_compare_exchange_weak(&self->r_value, &old, new)) { @@ -116,6 +118,7 @@ int taos_metric_sample_sub(taos_metric_sample_t *self, double r_value) { return 0; } +*/ int taos_metric_sample_set(taos_metric_sample_t *self, double r_value) { if (self->type != TAOS_GAUGE && self->type != TAOS_COUNTER) {