#include <ShoreApp.h> void Shore::get_stats(AppStats *stats, bool clear = false); void Shore::clear_stats();
These methods are the interface to a statistics-gathering facility that application programmers may find useful for debugging or performance-tuning purposes.
Get_stats fills in the AppStats structure given by stats with the current statistics. If clear is "true", then all statistics are reset to zero. Clear_stats resets the statistics to zero after begin copied.
Shore::init (see init(oc) ) initializes the statistics to zero. After initialization, the statistics are never reset, unless explicitly requested by the application via calls to get_stats or clear_stats.
The AppStats structure, defined in OCTypes.h, looks like this:
struct AppStats
{
int anoncreates;
int regcreates;
int ncached;
int nupdates;
int ndestroys;
};
The fields of AppStats are:
anoncreates: the number of anonymous objects created.
regcreates: the number of registered object created.
ncached: the number of fetch operations performed.
nupdates: the number of objects updated.
ndestroys: the number of objects destroyed.