|
|
@ -542,14 +542,17 @@ extern GHashTable *rtpe_callhash; |
|
|
extern struct call_iterator_list rtpe_call_iterators[NUM_CALL_ITERATORS]; |
|
|
extern struct call_iterator_list rtpe_call_iterators[NUM_CALL_ITERATORS]; |
|
|
|
|
|
|
|
|
extern struct global_stats_gauge rtpe_stats_gauge; |
|
|
extern struct global_stats_gauge rtpe_stats_gauge; |
|
|
|
|
|
extern struct global_stats_gauge_min_max rtpe_stats_gauge_graphite_min_max; |
|
|
|
|
|
|
|
|
#define RTPE_GAUGE_SET(field, num) \ |
|
|
#define RTPE_GAUGE_SET(field, num) \ |
|
|
do { \ |
|
|
do { \ |
|
|
atomic64_set(&rtpe_stats_gauge.field, num); \ |
|
|
atomic64_set(&rtpe_stats_gauge.field, num); \ |
|
|
|
|
|
RTPE_GAUGE_SET_MIN_MAX(field, rtpe_stats_gauge_graphite_min_max, num); \ |
|
|
} while (0) |
|
|
} while (0) |
|
|
#define RTPE_GAUGE_ADD(field, num) \ |
|
|
#define RTPE_GAUGE_ADD(field, num) \ |
|
|
do { \ |
|
|
do { \ |
|
|
atomic64_add(&rtpe_stats_gauge.field, num); \ |
|
|
|
|
|
|
|
|
uint64_t __old = atomic64_add(&rtpe_stats_gauge.field, num); \ |
|
|
|
|
|
RTPE_GAUGE_SET_MIN_MAX(field, rtpe_stats_gauge_graphite_min_max, __old + num); \ |
|
|
} while (0) |
|
|
} while (0) |
|
|
#define RTPE_GAUGE_INC(field) RTPE_GAUGE_ADD(field, 1) |
|
|
#define RTPE_GAUGE_INC(field) RTPE_GAUGE_ADD(field, 1) |
|
|
#define RTPE_GAUGE_DEC(field) RTPE_GAUGE_ADD(field, -1) |
|
|
#define RTPE_GAUGE_DEC(field) RTPE_GAUGE_ADD(field, -1) |
|
|
|