24 #ifndef _SIPWITCH_STATS_H_
25 #define _SIPWITCH_STATS_H_
27 #ifndef _UCOMMON_LINKED_H_
28 #include <ucommon/linked.h>
31 #ifndef _UCOMMON_THREAD_H_
32 #include <ucommon/thread.h>
35 #ifndef _UCOMMON_STRING_H_
36 #include <ucommon/string.h>
39 #ifndef _SIPWITCH_NAMESPACE_H_
45 #define STAT_MAP "sipwitch.stats"
62 typedef enum {INCOMING = 0, OUTGOING = 1} stat_t;
69 unsigned long total, period, pperiod;
70 unsigned short current, peak, min, max,
pmin, pmax;
81 void assign(
stat_t element);
88 void release(
stat_t element);
94 unsigned active(
void)
const;
102 static void period(FILE *file = NULL);
109 static stats *create(
void);
116 static stats *request(
const char *
id);
122 static void allocate(
unsigned count);
127 static void release(
void);
A stat element of call traffic.
GNU SIP Witch library namespace.