|
Electroneum
|


Go to the source code of this file.
Functions | |
| void | server_stats_init (struct ub_server_stats *stats, struct config_file *cfg) |
| void | server_stats_querymiss (struct ub_server_stats *stats, struct worker *worker) |
| void | server_stats_prefetch (struct ub_server_stats *stats, struct worker *worker) |
| void | server_stats_log (struct ub_server_stats *stats, struct worker *worker, int threadnum) |
| void | server_stats_obtain (struct worker *worker, struct worker *who, struct ub_stats_info *s, int reset) |
| void | server_stats_compile (struct worker *worker, struct ub_stats_info *s, int reset) |
| void | server_stats_reply (struct worker *worker, int reset) |
| void | server_stats_add (struct ub_stats_info *total, struct ub_stats_info *a) |
| void | server_stats_insquery (struct ub_server_stats *stats, struct comm_point *c, uint16_t qtype, uint16_t qclass, struct edns_data *edns, struct comm_reply *repinfo) |
| void | server_stats_insrcode (struct ub_server_stats *stats, struct sldns_buffer *buf) |
This file describes the data structure used to collect runtime performance numbers. These 'statistics' may be of interest to the operator.
Definition in file stats.h.
| void server_stats_add | ( | struct ub_stats_info * | total, |
| struct ub_stats_info * | a | ||
| ) |
Addup stat blocks.
| total | sum of the two entries. |
| a | to add to it. |
| void server_stats_compile | ( | struct worker * | worker, |
| struct ub_stats_info * | s, | ||
| int | reset | ||
| ) |
Compile stats into structure for this thread worker. Also clears the statistics counters (if that is set by config file).
| worker | the worker to compile stats for, also the executing worker. |
| s | stats block. |
| reset | if true, depending on config stats are reset. if false, statistics are not reset. |
| void server_stats_init | ( | struct ub_server_stats * | stats, |
| struct config_file * | cfg | ||
| ) |
Initialize server stats to 0.
| stats | what to init (this is alloced by the caller). |
| cfg | with extended statistics option. |
| void server_stats_insquery | ( | struct ub_server_stats * | stats, |
| struct comm_point * | c, | ||
| uint16_t | qtype, | ||
| uint16_t | qclass, | ||
| struct edns_data * | edns, | ||
| struct comm_reply * | repinfo | ||
| ) |
Add stats for this query
| stats | the stats |
| c | commpoint with type and buffer. |
| qtype | query type |
| qclass | query class |
| edns | edns record |
| repinfo | reply info with remote address |
| void server_stats_insrcode | ( | struct ub_server_stats * | stats, |
| struct sldns_buffer * | buf | ||
| ) |
Add rcode for this query.
| stats | the stats |
| buf | buffer with rcode. If buffer is length0: not counted. |
| void server_stats_log | ( | struct ub_server_stats * | stats, |
| struct worker * | worker, | ||
| int | threadnum | ||
| ) |
display the stats to the log
| void server_stats_obtain | ( | struct worker * | worker, |
| struct worker * | who, | ||
| struct ub_stats_info * | s, | ||
| int | reset | ||
| ) |
Obtain the stats info for a given thread. Uses pipe to communicate.
| worker | the worker that is executing (the first worker). |
| who | on who to get the statistics info. |
| s | the stats block to fill in. |
| reset | if stats can be reset. |
| void server_stats_prefetch | ( | struct ub_server_stats * | stats, |
| struct worker * | worker | ||
| ) |
add query if was cached and also resulted in a prefetch
| void server_stats_querymiss | ( | struct ub_server_stats * | stats, |
| struct worker * | worker | ||
| ) |
add query if it missed the cache
| void server_stats_reply | ( | struct worker * | worker, |
| int | reset | ||
| ) |
Send stats over comm tube in reply to query cmd
| worker | this worker. |
| reset | if true, depending on config stats are reset. if false, statistics are not reset. |