#include <StatisticsManager.h>
Public Member Functions | |
void | set (const char *key, int value) |
Sets the value of a statistic. | |
int | get (const char *key) |
Gets the value of a statistic (0 if not set). | |
void | print (const char *key) |
Print the value of a statistic to stderr. | |
void | printAll () |
Print all statistics to stderr. | |
void | resetAll () |
Reset all statistics to 0. | |
Static Public Member Functions | |
static StatisticsManager * | getInstance () |
Get the singleton instance of the StatisticsManager. |
Class to keep track of I/O and other statistics. FileHandle logs page reads and writes via keys STAT_PAGE_READS and STATS_PAGE_WRITES. You may add your own statistics tracking by invoking this class with user-defined keys.
This is intended to be a singleton class. Use StatisticsManager::getInstance to obtain a pointer to the singleton instance.