Planeshift
psOperProfile Class Reference

Statistics for one operation. More...

#include <psprofile.h>

Public Member Functions

void AddConsumption (double cons)
 Use this to notify about resource consumption. More...
 
csString Dump (double totalConsumption, const csString &unitName)
 Return textual description of consumption statistics where 'totalConsumption' is total consumption of resources by all kinds of operations and 'unitName' contains name of consumption unit (e.g. More...
 
double GetConsumption ()
 
 psOperProfile (const csString &desc)
 
void Reset ()
 Reset consumption counters. More...
 

Static Public Member Functions

static int cmpProfs (const void *a, const void *b)
 Sorting. More...
 

Protected Attributes

double consumption
 number of operations of this kind that took place More...
 
double count
 textual description More...
 
csStringFast< 100 > desc
 
double maxCons
 total resource consumption by this kind of operation More...
 

Detailed Description

Statistics for one operation.

Definition at line 48 of file psprofile.h.

Constructor & Destructor Documentation

psOperProfile::psOperProfile ( const csString &  desc)

Member Function Documentation

void psOperProfile::AddConsumption ( double  cons)

Use this to notify about resource consumption.

static int psOperProfile::cmpProfs ( const void *  a,
const void *  b 
)
static

Sorting.

csString psOperProfile::Dump ( double  totalConsumption,
const csString &  unitName 
)

Return textual description of consumption statistics where 'totalConsumption' is total consumption of resources by all kinds of operations and 'unitName' contains name of consumption unit (e.g.

"millisecond")

double psOperProfile::GetConsumption ( )
void psOperProfile::Reset ( )

Reset consumption counters.

Member Data Documentation

double psOperProfile::consumption
protected

number of operations of this kind that took place

Definition at line 72 of file psprofile.h.

double psOperProfile::count
protected

textual description

Definition at line 71 of file psprofile.h.

csStringFast<100> psOperProfile::desc
protected

Definition at line 70 of file psprofile.h.

double psOperProfile::maxCons
protected

total resource consumption by this kind of operation

Definition at line 73 of file psprofile.h.


The documentation for this class was generated from the following file: