class ProfilingUnit : public nn::nex::RootObject
Measures the time required to execute code.
This class can be used to get the total required time, average time, maximum time, and minimum time required to execute a certain block of code. For example, if you wanted to measure the time spent executing the foo
function, you add something like the following code around the foo
function:
{
static NAMESPACE_NEX ProfilingUnit s_pu(_T("foo_func"));
NAMESPACE_NEX ProfilingUnit::Scope scoped(s_pu);
foo();
}
After executing this code a number of time, you can get the time-measurement information registered to the s_pu
instance by calling GetTotalTime
or some other such member function for s_pu
.
nn::nex::ProfilingUnit::Scope | The class for writing the measurement information to ProfilingUnit . |
---|
IncAmount
|
Adds some amount that is meaningful to the application. (Example: Size of Send/Receive buffers) | |
---|---|---|
GetAmount
|
Gets the sum amount after the addition by the IncAmount function. |
|
SetOrder
|
Sets the variable to use for ProfilingUnit sorting. |
|
GetOrder
|
Gets the variable to use for ProfilingUnit sorting. |
|
GetTotalTime
|
Gets the total time required for execution. | |
GetMinTime
|
Gets the minimum time required for execution. | |
GetMaxTime
|
Gets the maximum time required for execution. | |
GetLastTime
|
Gets the newest required time. | |
GetAvgTime
|
Gets the average time required for execution. | |
GetVarTime
|
Gets the distribution. | |
GetNbOccurences
|
Gets the execution count. | |
GetName
|
Gets the name that was set for the ProfilingUnit object. |
|
GetID
|
Gets the ID of the ProfilingUnit object. |
|
SetName
|
Sets a name for the ProfilingUnit object. |
|
S |
Enable
|
Enables profiling. |
S |
Disable
|
Disables profiling. |
S |
IsEnabled
|
Determines whether profiling is enabled. |
S |
FindByName
|
Finds all ProfilingUnit objects that have the specified name in the list. |
nn::nex::RootObject
nn::nex::ProfilingUnit
CONFIDENTIAL