X-Git-Url: http://git.vrable.net/?a=blobdiff_plain;ds=sidebyside;f=bluesky%2Fbluesky.h;h=ff2bf23b05ea87ab102a653cce0aca18d4fa9ca5;hb=348aaaad42163d6829112c9b18026c16b09e1914;hp=714ec55b54737eac0a00baa9d1c5c6895f6b3c5b;hpb=615c5a3a7d914dcb31c447404756dd41073b2a9c;p=bluesky.git diff --git a/bluesky/bluesky.h b/bluesky/bluesky.h index 714ec55..ff2bf23 100644 --- a/bluesky/bluesky.h +++ b/bluesky/bluesky.h @@ -41,6 +41,16 @@ extern BlueSkyOptions bluesky_options; * limit */ extern int bluesky_max_threads; +/* A general-purpose counter for gathering run-time statistics. */ +struct bluesky_stats { + const char *name; + int64_t count; + int64_t sum; +}; +struct bluesky_stats *bluesky_stats_new(const char *name); +void bluesky_stats_add(struct bluesky_stats *stats, int64_t value); +void bluesky_stats_dump_all(); + /* BlueSky status and error codes. Various frontends should translate these to * the appropriate error code for whatever protocol they implement. */ typedef enum {