20 #ifndef __PSPROFILE_H__ 21 #define __PSPROFILE_H__ 23 #include <csutil/parray.h> 24 #include <csutil/csstring.h> 25 #include <csutil/hash.h> 62 csString
Dump(
double totalConsumption,
const csString & unitName);
67 static int cmpProfs(
const void * a,
const void * b);
89 void Dump(
const csStringFast<50> & unitName, csStringFast<50> & header, csStringFast<50> & list);
94 csPDelArray<psOperProfile>
profs;
111 virtual void AddCons(
const csString & operName, csTicks time);
115 csString
Dump(
const csString & unitName,
const csString & header);
double consumption
number of operations of this kind that took place
void AddConsumption(double cons)
Use this to notify about resource consumption.
double maxCons
total resource consumption by this kind of operation
double count
textual description
csHash< psOperProfile *, csString > namedProfs
Maps strings IDs to their operations.
csString Dump(double totalConsumption, const csString &unitName)
Return textual description of consumption statistics where 'totalConsumption' is total consumption of...
Statistics for one operation.
void Reset()
Reset consumption counters.
Statistics of consumption by operations that are identified by names (strings) This is usable for mos...
csTicks profStart
keeps statistics of all operations
csPDelArray< psOperProfile > profs
Used to measure time intervals.
psOperProfile(const csString &desc)
virtual ~psNamedProfiles()
needed to clear MSVC warning
static int cmpProfs(const void *a, const void *b)
Sorting.
Statistics for all kinds of operations This class is abstract, you have to inherit from it to use it...