X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=clients%2Fms_stats.h;h=5ac88b3f869bee4fcf4a93fb53055bbb22a2fbef;hb=a509498cb4ed697b20da4822d6ddccaf6a246b66;hp=9b67cf792535d033cac027a64aff28480bc8ef14;hpb=ea32b463888ecfd7525eb88859cc2bb4af9b24d3;p=m6w6%2Flibmemcached diff --git a/clients/ms_stats.h b/clients/ms_stats.h index 9b67cf79..5ac88b3f 100644 --- a/clients/ms_stats.h +++ b/clients/ms_stats.h @@ -23,37 +23,44 @@ extern "C" { #endif /* statistic structure of response time */ -typedef struct { - char * name; - uint64_t total_time; - uint64_t min_time; - uint64_t max_time; - uint64_t get_miss; - uint64_t dist[65]; - double squares; - double log_product; - - uint64_t period_min_time; - uint64_t period_max_time; - uint64_t pre_get_miss; - uint64_t pre_events; - uint64_t pre_total_time; - uint64_t pre_squares; - double pre_log_product; +typedef struct +{ + char *name; + uint64_t total_time; + uint64_t min_time; + uint64_t max_time; + uint64_t get_miss; + uint64_t dist[65]; + double squares; + double log_product; + + uint64_t period_min_time; + uint64_t period_max_time; + uint64_t pre_get_miss; + uint64_t pre_events; + uint64_t pre_total_time; + uint64_t pre_squares; + double pre_log_product; } ms_stat_t; /* initialize statistic */ void ms_init_stats(ms_stat_t *stat, const char *name); + /* record one event */ void ms_record_event(ms_stat_t *stat, uint64_t time, int get_miss); + /* dump the statistics */ void ms_dump_stats(ms_stat_t *stat); + /* dump the format statistics */ -void ms_dump_format_stats(ms_stat_t *stat, int run_time, - int freq, int obj_size); +void ms_dump_format_stats(ms_stat_t *stat, + int run_time, + int freq, + int obj_size); + #ifdef __cplusplus }