A container class for profiling data.
This class provides access to profiling data for multiple CYIProfileData.
#include <utility/YiProfiler.h>
Public Types | |
| enum | REPORT_FORMAT { PLAIN_TEXT, XML } |
Public Member Functions | |
| CYIProfiler (bool bThreadSafe=false, uint32_t uMaxProfiles=20) | |
| ~CYIProfiler () | |
| void | ResetProfiles (void) |
| void | StartProfile (uint32_t uIndex) |
| void | StopProfile (uint32_t uIndex) |
| bool | AddProfile (uint32_t uIndex, const CYIString &rName) |
| CYIProfileData * | GetProfileData (uint32_t uIndex) const |
| void | SetMaximumProfiles (uint32_t uMaxProfiles) |
| uint32_t | GetMaximumProfiles () const |
| CYIString | Report (REPORT_FORMAT eFormat=PLAIN_TEXT, CYIProfileData::ACCURACY eAccuracy=CYIProfileData::MILLISECONDS) const |
| CYIString | Report (const std::vector< uint32_t > uIndexes, REPORT_FORMAT eFormat=PLAIN_TEXT, CYIProfileData::ACCURACY eAccuracy=CYIProfileData::MILLISECONDS) const |
| CYIProfiler::CYIProfiler | ( | bool | bThreadSafe = false, |
| uint32_t | uMaxProfiles = 20 |
||
| ) |
Constructs a CYIProfiler that is bThreadSafe capable of handling uMaxProfiles CYIProfileData items.
| CYIProfiler::~CYIProfiler | ( | ) |
| bool CYIProfiler::AddProfile | ( | uint32_t | uIndex, |
| const CYIString & | rName | ||
| ) |
Add a CYIProfileData item at uIndex with rName.
| uint32_t CYIProfiler::GetMaximumProfiles | ( | ) | const |
Returns the maximum number of CYIProfileData items supported by the CYIProfiler.
| CYIProfileData* CYIProfiler::GetProfileData | ( | uint32_t | uIndex | ) | const |
Returns a pointer to the CYIProfileData item at uIndex.
| CYIString CYIProfiler::Report | ( | REPORT_FORMAT | eFormat = PLAIN_TEXT, |
| CYIProfileData::ACCURACY | eAccuracy = CYIProfileData::MILLISECONDS |
||
| ) | const |
Get a report from all CYIProfileData objects, optionally in XML format.
| CYIString CYIProfiler::Report | ( | const std::vector< uint32_t > | uIndexes, |
| REPORT_FORMAT | eFormat = PLAIN_TEXT, |
||
| CYIProfileData::ACCURACY | eAccuracy = CYIProfileData::MILLISECONDS |
||
| ) | const |
Get a report from the CYIProfileData at indicies specified in uIndexes, optionally in XML format.
| void CYIProfiler::ResetProfiles | ( | void | ) |
Resets all CYIProfileData counters to 0.
| void CYIProfiler::SetMaximumProfiles | ( | uint32_t | uMaxProfiles | ) |
Sets the maximum number of CYIProfileData items supported by the CYIProfiler.
| void CYIProfiler::StartProfile | ( | uint32_t | uIndex | ) |
Start profiling for the CYIProfileData item at uIndex.
| void CYIProfiler::StopProfile | ( | uint32_t | uIndex | ) |
Stop profiling for the CYIProfileData item at uIndex.