26 #define qev_stats_counter_inc(counter) qev_stats_counter_add(counter, 1);
37 #define qev_stats_counter_dec(counter) qev_stats_counter_add(counter, -1);
47 #define qev_stats_time(timer, block) { \
48 gint64 qev_stats_timer_start = g_get_monotonic_time(); \
50 qev_stats_timer_record(timer, g_get_monotonic_time() - qev_stats_timer_start); }
156 const gchar *description);
178 const gchar *description);
221 const gboolean reset_on_flush,
222 const gchar *description);
246 const gboolean reset_on_flush,
248 const gchar *description);
291 const gchar *description);
328 const gchar *description);
gboolean active
If the threshold has been configured and is active.
Definition: stats.h:59
void qev_stats_gauge_set(qev_stats_gauge_t *gauge, gint64 val)
Set the gauge to the given value.
gint64 qev_stats_counter_add(qev_stats_counter_t *counter, const gint64 val)
Add the given value to the counter.
qev_stats_gauge_t * qev_stats_gauge(const gchar *prefix, const gchar *name, const gchar *description)
Adds a gauge to the stats lineup.
struct qev_stats_timer qev_stats_timer_t
A timer stat.
Definition: stats.h:137
void qev_stats_timer_record(qev_stats_timer_t *timer, const gint64 us)
Records a time to the timer.
qev_stats_gauge_t * qev_stats_gauge_monitor(const gchar *prefix, const gchar *name, const qev_stats_monitor_fn monitor, const gchar *description)
Adds a gauge to the stats lineup.
For determining if something should be alerted on.
Definition: stats.h:55
qev_stats_timer_t * qev_stats_timer_monitor(const gchar *prefix, const gchar *name, const qev_stats_monitor_fn monitor_sum, const qev_stats_monitor_fn monitor_stddev, const qev_stats_monitor_fn monitor_mean, const qev_stats_monitor_fn monitor_max, const qev_stats_monitor_fn monitor_min, const qev_stats_monitor_fn monitor_count, const gchar *description)
Adds a timer to the stats lineup.
gboolean has_crit
If there is a warn value for this threshold.
Definition: stats.h:79
gboolean warn_greater
The compare for warn is greater.
Definition: stats.h:69
gint(* qev_stats_monitor_fn)(const gint64 val, const struct qev_stats_threshold thresh, GString *msg)
A custom monitoring function.
Definition: stats.h:119
gint64 qev_stats_counter_get(qev_stats_counter_t *counter)
Get the given value to the counter at this instant.
qev_stats_timer_t * qev_stats_timer(const gchar *prefix, const gchar *name, const gchar *description)
Adds a timer to the stats lineup.
qev_stats_counter_t * qev_stats_counter_monitor(const gchar *prefix, const gchar *name, const gboolean reset_on_flush, const qev_stats_monitor_fn monitor, const gchar *description)
Adds a counter to the stats lineup.
gint64 warn
If warn_greater, warn when val > warn, otherwise when val < warn.
Definition: stats.h:74
gboolean crit_greater
The compare for critical is greater.
Definition: stats.h:84
gboolean has_warn
If there is a warn value for this threshold.
Definition: stats.h:64
gint64 crit
If crit_greater, warn when val > crit, otherwise when val < crit.
Definition: stats.h:89
Provides all the qev_* functions that are needed for creating an event loop.
qev_stats_counter_t * qev_stats_counter(const gchar *prefix, const gchar *name, const gboolean reset_on_flush, const gchar *description)
Adds a counter to the stats lineup.
struct qev_stats_gauge qev_stats_gauge_t
A gauge stat.
Definition: stats.h:127
gint64 qev_stats_gauge_get(qev_stats_gauge_t *gauge)
Get the value of the gauge right now.
struct qev_stats_counter qev_stats_counter_t
A counter stat.
Definition: stats.h:132