Teonet library  0.4.7
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
metric.c File Reference
#include "metric.h"
#include "ev_mgr.h"

Macros

#define MODULE   "metrics"
 File: metric.c Author: Kirill Scherba kiril.nosp@m.l@sc.nosp@m.herba.nosp@m..ru More...
 

Functions

teoMetricClassteoMetricInit (void *kep)
 Initialize Metrics module. More...
 
void teoMetricDestroy (teoMetricClass *tm)
 Destroy Metrics module. More...
 
void teoMetricCounter (teoMetricClass *tm, const char *name, int value)
 Send counter teonet metric. More...
 
void teoMetricCounterf (teoMetricClass *tm, const char *name, double value)
 Send counter teonet metric. More...
 
void teoMetricMs (teoMetricClass *tm, const char *name, double value)
 Send time(ms) teonet metric. More...
 
void teoMetricGauge (teoMetricClass *tm, const char *name, int value)
 Send gauge teonet metrics. More...
 
void teoMetricGaugef (teoMetricClass *tm, const char *name, double value)
 Send gauge teonet metrics. More...
 
void metric_teonet_count (teoMetricClass *tm)
 Send default teonet metrics. More...
 

Macro Definition Documentation

#define MODULE   "metrics"

File: metric.c Author: Kirill Scherba kiril.nosp@m.l@sc.nosp@m.herba.nosp@m..ru

Metrics module

Created on November 28, 2019, 1:38 PM

See Teonet Metrics System description in sh/statsd/README.md

Referenced by teoMetricInit().

Function Documentation

void teoMetricCounter ( teoMetricClass tm,
const char *  name,
int  value 
)

Send counter teonet metric.

Parameters
tmPointer to teoMetricClass
nameMetrics name
valueMetrics counter value

Referenced by metric_teonet_count(), and teo::Teonet::metricCounter().

void teoMetricCounterf ( teoMetricClass tm,
const char *  name,
double  value 
)

Send counter teonet metric.

Parameters
tmPointer to teoMetricClass
nameMetrics name
valueMetrics counter value

Referenced by teo::Teonet::metricCounter().

void teoMetricDestroy ( teoMetricClass tm)

Destroy Metrics module.

Parameters
tmPointer to teoMetricClass

References free().

Referenced by modules_destroy().

void teoMetricGauge ( teoMetricClass tm,
const char *  name,
int  value 
)

Send gauge teonet metrics.

Parameters
tmPointer to teoMetricClass
nameMetrics name
valueMetrics gauge value

Referenced by cmd_disconnected_cb(), metric_teonet_count(), and teo::Teonet::metricGauge().

void teoMetricGaugef ( teoMetricClass tm,
const char *  name,
double  value 
)

Send gauge teonet metrics.

Parameters
tmPointer to teoMetricClass
nameMetrics name
valueMetrics gauge value

Referenced by ksnetArpMetrics(), and teo::Teonet::metricGauge().

teoMetricClass* teoMetricInit ( void *  kep)
void teoMetricMs ( teoMetricClass tm,
const char *  name,
double  value 
)

Send time(ms) teonet metric.

Parameters
tmPointer to teoMetricClass
nameMetrics name
valueMetrics ms value

Referenced by teo::Teonet::metricMs().