ze-filter  (ze-filter-0.8.0-develop-180218)
ze-stats.c File Reference
#include <ze-sys.h>
#include "ze-filter.h"

Go to the source code of this file.

Classes

struct  _code
 

Macros

#define MAX_SCORE   32
 
#define STATE_FILE   "ze-state"
 
#define SCORE_LOCK()   MUTEX_LOCK(&msg_score.mutex)
 
#define SCORE_UNLOCK()   MUTEX_UNLOCK(&msg_score.mutex)
 
#define STATS_LOCK()   MUTEX_LOCK(&st_mutex)
 
#define STATS_UNLOCK()   MUTEX_UNLOCK(&st_mutex)
 

Typedefs

typedef struct _code CODE
 

Functions

void msg_score_stats_update (msg_scores_T *scores)
 
void msg_score_stats_print (int fd, int which)
 
bool log_counters_reopen ()
 
void log_counters (int fd, bool dump)
 
void stats_reset ()
 
void stats_inc (int which, long n)
 
void save_state ()
 
void read_state ()
 
void init_proc_state ()
 
void reset_state ()
 
int print_state (int ofd)
 
char * stats_title (int code)
 
void print_p_stats (int ofd, p_stats_T *st, char *title, int c, int all)
 
void print_p_stats_all (int ofd, p_stats_T *sta, char *titlea, p_stats_T *stb, char *titleb, int all, bool nf)
 
int dump_state (int ofd, int jp, int jg, int all, bool nf)
 
void print_filter_stats_summary ()
 

Macro Definition Documentation

◆ MAX_SCORE

#define MAX_SCORE   32

Definition at line 33 of file ze-stats.c.

◆ SCORE_LOCK

#define SCORE_LOCK ( )    MUTEX_LOCK(&msg_score.mutex)

Definition at line 47 of file ze-stats.c.

◆ SCORE_UNLOCK

#define SCORE_UNLOCK ( )    MUTEX_UNLOCK(&msg_score.mutex)

Definition at line 48 of file ze-stats.c.

◆ STATE_FILE

#define STATE_FILE   "ze-state"

Definition at line 34 of file ze-stats.c.

◆ STATS_LOCK

#define STATS_LOCK ( )    MUTEX_LOCK(&st_mutex)

Definition at line 204 of file ze-stats.c.

◆ STATS_UNLOCK

#define STATS_UNLOCK ( )    MUTEX_UNLOCK(&st_mutex)

Definition at line 205 of file ze-stats.c.

Typedef Documentation

◆ CODE

typedef struct _code CODE

Function Documentation

◆ dump_state()

int dump_state ( int  ofd,
int  jp,
int  jg,
int  all,
bool  nf 
)

Definition at line 1073 of file ze-stats.c.

◆ init_proc_state()

void init_proc_state ( )

Definition at line 502 of file ze-stats.c.

◆ log_counters()

void log_counters ( int  fd,
bool  dump 
)

Definition at line 330 of file ze-stats.c.

◆ log_counters_reopen()

bool log_counters_reopen ( )

Definition at line 324 of file ze-stats.c.

◆ msg_score_stats_print()

void msg_score_stats_print ( int  fd,
int  which 
)

Definition at line 118 of file ze-stats.c.

◆ msg_score_stats_update()

void msg_score_stats_update ( msg_scores_T scores)

Definition at line 52 of file ze-stats.c.

◆ print_filter_stats_summary()

void print_filter_stats_summary ( void  )

Definition at line 1146 of file ze-stats.c.

◆ print_p_stats()

void print_p_stats ( int  ofd,
p_stats_T st,
char *  title,
int  c,
int  all 
)

Definition at line 807 of file ze-stats.c.

◆ print_p_stats_all()

void print_p_stats_all ( int  ofd,
p_stats_T sta,
char *  titlea,
p_stats_T stb,
char *  titleb,
int  all,
bool  nf 
)

Definition at line 878 of file ze-stats.c.

◆ print_state()

int print_state ( int  ofd)

Definition at line 548 of file ze-stats.c.

◆ read_state()

void read_state ( )

Definition at line 467 of file ze-stats.c.

◆ reset_state()

void reset_state ( )

Definition at line 528 of file ze-stats.c.

◆ save_state()

void save_state ( )

Definition at line 430 of file ze-stats.c.

◆ stats_inc()

void stats_inc ( int  which,
long  n 
)

Definition at line 401 of file ze-stats.c.

◆ stats_reset()

void stats_reset ( )

Definition at line 381 of file ze-stats.c.

◆ stats_title()

char* stats_title ( int  code)

Definition at line 782 of file ze-stats.c.

Variable Documentation

◆ bay

int bay[MAX_SCORE+2]

Definition at line 42 of file ze-stats.c.

◆ msg

int msg[MAX_SCORE+2]

Definition at line 41 of file ze-stats.c.

◆ mutex

pthread_mutex_t mutex

Definition at line 38 of file ze-stats.c.

◆ nb

int nb

Definition at line 37 of file ze-stats.c.

◆ ora

int ora[MAX_SCORE+2]

Definition at line 39 of file ze-stats.c.

◆ reg

int reg[MAX_SCORE+2]

Definition at line 40 of file ze-stats.c.