#include <ShoreApp.h> #include <ShoreStats.h> class w_statistics_t; // forward; // defined in <w_statistics.h>, included by <ShoreApp.h> static shrc Shore::gather_stats(w_statistics_t &, bool remote=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. The statistics are gathered with gather_stats. Each statistic kept has a name and a manifest constant of that name for use with the generic statistics-gathering programming interface described in statistics(fc) . The names and descriptions of the statistics are listed in sections below.
Gather_stats fills in the w_statistics_t structure with the current local or remote statistics. Local and remote statistics are maintained at all the levels of the Shore software. There is no single data structure that contains all the statistics at all the layers. The w_statistics_t class is used to hold the statistics in a generic form, which, for each statistic, includes a description of the statistics (a character string), a value for the statistic (integer, unsigned integer, or floating point number), and a manifest constant for identifying the statistic. Details about programming with the w_statistics_t class are in statistics(fc) . Clear_stats resets the statistics to zero. If the Object cache option oc_pstats has the value true or yes, the statistics are gathered, printed, and cleared each time a transaction is committed or aborted.
Shore::init (see init(oc) ) initializes the local statistics to zero.
The Object Cache maintains the following statistics, identified by their manifest constants (which are defined in <ShoreStats.h>).
The Shore Value-Added Server statistics are also gathered. They are described in statistics(svas) . Unix resource-usage statistics are also gathered. They are describe in getrusage(2).
If the flag remote is false on a call to gather_stats, only the statistics for the client process are gathered. If the value of remote is true, statistics are gathered from the server instead. Remote statistics compose a collection of statistics gathered from 13 different software modules within the Shore server. They are not described in detail anywhere, but many of the statistics are self-describing when printed.