Richard Boegli's CnC_Generals_Zero_Hour Fork WIP
This is documentation of Richard Boegil's Zero Hour Fork
 
Loading...
Searching...
No Matches
Profile Class Reference

Functions common to both profilers. More...

#include <profile.h>

Static Public Member Functions

static void StartRange (const char *range=0)
 Starts range recording.
 
static void AppendRange (const char *range=0)
 Appends profile data to the last recorded frame of the given range.
 
static void StopRange (const char *range=0)
 Stops range recording.
 
static bool IsEnabled (void)
 Determines if any range recording is enabled or not.
 
static unsigned GetFrameCount (void)
 Determines the number of known (recorded) range frames.
 
static const char * GetFrameName (unsigned frame)
 Determines the range name of a recorded range frame.
 
static void ClearTotals (void)
 Resets all 'total' counter values to 0.
 
static _int64 GetClockCyclesPerSecond (void)
 Determines number of CPU clock cycles per second.
 
static void AddResultFunction (ProfileResultInterface *(*func)(int, const char *const *), const char *name, const char *arg)
 Add the given result function interface.
 

Friends

class ProfileCmdInterface
 

Detailed Description

Functions common to both profilers.

Definition at line 59 of file profile.h.

Member Function Documentation

◆ AddResultFunction()

void Profile::AddResultFunction ( ProfileResultInterface *(* func )(int, const char *const *),
const char * name,
const char * arg )
static

Add the given result function interface.

Parameters
funcfactory function
namefactory name
argdescription of optional parameters the factory function recognizes

Definition at line 340 of file profile.cpp.

◆ AppendRange()

void Profile::AppendRange ( const char * range = 0)
static

Appends profile data to the last recorded frame of the given range.

Parameters
rangename of range to record, ==NULL for "frame"

Definition at line 215 of file profile.cpp.

◆ ClearTotals()

void Profile::ClearTotals ( void )
static

Resets all 'total' counter values to 0.

This function does not change any recorded frames.

Definition at line 327 of file profile.cpp.

◆ GetClockCyclesPerSecond()

_int64 Profile::GetClockCyclesPerSecond ( void )
static

Determines number of CPU clock cycles per second.

Note
This value is cached internally so this function is quite fast.
Returns
number of CPU clock cycles per second

Definition at line 335 of file profile.cpp.

◆ GetFrameCount()

unsigned Profile::GetFrameCount ( void )
static

Determines the number of known (recorded) range frames.

Note that if function level profiling is enabled then the number of recorded high level frames is the same as the number of recorded function level frames.

Returns
number of recorded range frames

Definition at line 317 of file profile.cpp.

◆ GetFrameName()

const char * Profile::GetFrameName ( unsigned frame)
static

Determines the range name of a recorded range frame.

Note
A unique number will be added to the frame name, separated by a ':', e.g. 'frame:3'
Parameters
framenumber of recorded frame
Returns
range name

Definition at line 322 of file profile.cpp.

◆ IsEnabled()

bool Profile::IsEnabled ( void )
static

Determines if any range recording is enabled or not.

Returns
true if range profiling is enabled, false if not

Definition at line 309 of file profile.cpp.

◆ StartRange()

void Profile::StartRange ( const char * range = 0)
static

Starts range recording.

Parameters
rangename of range to record, ==NULL for "frame"

Definition at line 161 of file profile.cpp.

◆ StopRange()

void Profile::StopRange ( const char * range = 0)
static

Stops range recording.

Note
After this call the recorded range data will be available as a new range frame.
Parameters
rangename of range to record, ==NULL for "frame"

Definition at line 265 of file profile.cpp.

Friends And Related Symbol Documentation

◆ ProfileCmdInterface

friend class ProfileCmdInterface
friend

Definition at line 61 of file profile.h.


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