Go to the source code of this file.
Defines | |
#define | CRLF "\r\n" |
#define | NL "\n" |
Functions | |
static int | ccnr_collect_stats (struct ccnr_handle *h, struct ccnr_stats *ans) |
static struct ccn_charbuf * | collect_stats_html (struct ccnr_handle *h) |
static void | send_http_response (struct ccnr_handle *h, struct fdholder *fdholder, const char *mime_type, struct ccn_charbuf *response) |
static struct ccn_charbuf * | collect_stats_xml (struct ccnr_handle *h) |
static void | ccnr_stats_http_set_debug (struct ccnr_handle *h, struct fdholder *fdholder, int level) |
int | ccnr_stats_handle_http_connection (struct ccnr_handle *h, struct fdholder *fdholder) |
static void | collect_faces_html (struct ccnr_handle *h, struct ccn_charbuf *b) |
static void | collect_face_meter_html (struct ccnr_handle *h, struct ccn_charbuf *b) |
static void | collect_forwarding_html (struct ccnr_handle *h, struct ccn_charbuf *b) |
static unsigned | ccnr_colorhash (struct ccnr_handle *h) |
static void | collect_meter_xml (struct ccnr_handle *h, struct ccn_charbuf *b, struct ccnr_meter *m) |
static void | collect_faces_xml (struct ccnr_handle *h, struct ccn_charbuf *b) |
static void | collect_forwarding_xml (struct ccnr_handle *h, struct ccn_charbuf *b) |
struct ccnr_meter * | ccnr_meter_create (struct ccnr_handle *h, const char *what) |
create and initialize separately allocated meter. | |
void | ccnr_meter_destroy (struct ccnr_meter **pm) |
Destroy a separately allocated meter. | |
void | ccnr_meter_init (struct ccnr_handle *h, struct ccnr_meter *m, const char *what) |
Initialize a meter. | |
void | ccnr_meter_bump (struct ccnr_handle *h, struct ccnr_meter *m, unsigned amt) |
Count something (messages, packets, bytes), and roll up some kind of statistics on it. | |
unsigned | ccnr_meter_rate (struct ccnr_handle *h, struct ccnr_meter *m) |
Return the average rate (units per second) of a metered quantity. | |
uintmax_t | ccnr_meter_total (struct ccnr_meter *m) |
Return the grand total for a metered quantity. | |
Variables | |
static const char * | resp404 |
static const char * | resp405 |
static const unsigned | meterHz = 7 |
Part of ccnr - CCNx Repository Daemon.
Definition in file ccnr_stats.c.
#define CRLF "\r\n" |
Definition at line 53 of file ccnr_stats.c.
#define NL "\n" |
Definition at line 54 of file ccnr_stats.c.
static int ccnr_collect_stats | ( | struct ccnr_handle * | h, | |
struct ccnr_stats * | ans | |||
) | [static] |
Definition at line 185 of file ccnr_stats.c.
Referenced by collect_stats_html(), and collect_stats_xml().
static unsigned ccnr_colorhash | ( | struct ccnr_handle * | h | ) | [static] |
void ccnr_meter_bump | ( | struct ccnr_handle * | h, | |
struct ccnr_meter * | m, | |||
unsigned | amt | |||
) |
Count something (messages, packets, bytes), and roll up some kind of statistics on it.
Definition at line 645 of file ccnr_stats.c.
Referenced by ccnr_meter_init(), ccnr_meter_rate(), process_incoming_content(), r_dispatch_process_input(), r_dispatch_process_internal_client_buffer(), r_io_send(), and r_link_send_content().
struct ccnr_meter* ccnr_meter_create | ( | struct ccnr_handle * | h, | |
const char * | what | |||
) | [read] |
create and initialize separately allocated meter.
Definition at line 602 of file ccnr_stats.c.
Referenced by r_io_enroll_face().
void ccnr_meter_destroy | ( | struct ccnr_meter ** | pm | ) |
Destroy a separately allocated meter.
Definition at line 616 of file ccnr_stats.c.
Referenced by r_io_shutdown_client_fd().
void ccnr_meter_init | ( | struct ccnr_handle * | h, | |
struct ccnr_meter * | m, | |||
const char * | what | |||
) |
unsigned ccnr_meter_rate | ( | struct ccnr_handle * | h, | |
struct ccnr_meter * | m | |||
) |
Return the average rate (units per second) of a metered quantity.
m may be NULL.
Definition at line 672 of file ccnr_stats.c.
Referenced by collect_face_meter_html(), and collect_meter_xml().
uintmax_t ccnr_meter_total | ( | struct ccnr_meter * | m | ) |
Return the grand total for a metered quantity.
m may be NULL.
Definition at line 689 of file ccnr_stats.c.
Referenced by collect_meter_xml(), and r_store_reindexing().
int ccnr_stats_handle_http_connection | ( | struct ccnr_handle * | h, | |
struct fdholder * | fdholder | |||
) |
static void ccnr_stats_http_set_debug | ( | struct ccnr_handle * | h, | |
struct fdholder * | fdholder, | |||
int | level | |||
) | [static] |
static void collect_face_meter_html | ( | struct ccnr_handle * | h, | |
struct ccn_charbuf * | b | |||
) | [static] |
Definition at line 273 of file ccnr_stats.c.
static void collect_faces_html | ( | struct ccnr_handle * | h, | |
struct ccn_charbuf * | b | |||
) | [static] |
Definition at line 227 of file ccnr_stats.c.
static void collect_faces_xml | ( | struct ccnr_handle * | h, | |
struct ccn_charbuf * | b | |||
) | [static] |
Definition at line 447 of file ccnr_stats.c.
static void collect_forwarding_html | ( | struct ccnr_handle * | h, | |
struct ccn_charbuf * | b | |||
) | [static] |
Definition at line 306 of file ccnr_stats.c.
static void collect_forwarding_xml | ( | struct ccnr_handle * | h, | |
struct ccn_charbuf * | b | |||
) | [static] |
Definition at line 495 of file ccnr_stats.c.
static void collect_meter_xml | ( | struct ccnr_handle * | h, | |
struct ccn_charbuf * | b, | |||
struct ccnr_meter * | m | |||
) | [static] |
Definition at line 433 of file ccnr_stats.c.
static struct ccn_charbuf * collect_stats_html | ( | struct ccnr_handle * | h | ) | [static, read] |
Definition at line 361 of file ccnr_stats.c.
static struct ccn_charbuf * collect_stats_xml | ( | struct ccnr_handle * | h | ) | [static, read] |
Definition at line 540 of file ccnr_stats.c.
static void send_http_response | ( | struct ccnr_handle * | h, | |
struct fdholder * | fdholder, | |||
const char * | mime_type, | |||
struct ccn_charbuf * | response | |||
) | [static] |
Definition at line 162 of file ccnr_stats.c.
const unsigned meterHz = 7 [static] |
Definition at line 638 of file ccnr_stats.c.
const char* resp404 [static] |
Initial value:
Definition at line 81 of file ccnr_stats.c.
const char* resp405 [static] |
Initial value:
Definition at line 85 of file ccnr_stats.c.