Public Member Functions | Static Public Member Functions | Public Attributes

FBProfiler Class Reference

Search for all occurrences

Detailed Description

FBProfiler.

Central place to query profiling results and change profiling options.

Definition at line 225 of file fbprofiler.h.

#include <fbprofiler.h>

Inheritance diagram for FBProfiler:
Inheritance graph
[legend]

List of all members.

Public Member Functions

  FBProfiler (HIObject pObject=NULL)
  Constructor.
int  GetEventSampleCount ()
  Get number of time event samples collected during last sampling.
HFBProfileTimeEvent  GetEventSample (int pIndex)
  Only possible way to query collected FBProfileTimeEvent.
HFBProfileTimeEvent  GetEndEventSample (int pIndex)
  Get end time event for event at given index.
int  GetStatCount ()
  Stats are holding last execution time/duration of action.
int  GetStatIndex (const char *pName)
  Search for index of given stat name.
const char *  GetStatName (int pIndex)
  Get information about what action is stat refering to.
const char *  GetStatComment (int pIndex)
  Get aditional information about what action is stat refering to.
double  GetStatDuration (int pIndex)
  Get time that was spend on execution of action.
double  GetProfilingCost ()
  Profiling collection can affect scene performace.

Static Public Member Functions

static int  RegisterTaskCycle (const char *pUniqueName, float *pColor=NULL)
  Register a new task cycle for profiling.
static bool  IsTaskCycleNameRegistered (const char *pName)
  Test to see if a task cycle is already registered based on the name provided.
static FBProfiler TheOne ()
  Get the global object for this class.

Public Attributes

FBPropertyProfilingMode  ProfilingMode
  Read/Write Property: Profiling collection modes, including disabling all profiling.
FBPropertyInt  EvaluationDepth
  Read/Write Property: Specify the depth of evaluation profiling for data collection (maximum value is 10).
FBPropertyInt  BufferSize
  Read/Write Property: Buffer size for average and timing computation (maximum value 200).
FBPropertyBool  FrameReference
  Read/Write Property: Draw task cycles in relation to main thread cycle time - frame cycle (percentage display).
FBPropertyBool  ActiveSampling
  Read/Write Property: Activate the sampling for time events.

Constructor & Destructor Documentation

FBProfiler ( HIObject  pObject = NULL )

Constructor.

Parameters:
pObject For internal use only.

Member Function Documentation

int GetEventSampleCount ( )

Get number of time event samples collected during last sampling.

Returns:
Number of FBProfileTimeEvent samples gathered during sampling.
HFBProfileTimeEvent GetEventSample ( int  pIndex )

Only possible way to query collected FBProfileTimeEvent.

Parameters:
pIndex Sample index.
Returns:
Sample object.
HFBProfileTimeEvent GetEndEventSample ( int  pIndex )

Get end time event for event at given index.

This function and FBProfileTimeEvent.IsSingleEvent are useful to identify duration of event action.

Parameters:
pIndex Sample index.
Returns:
Sample object if sample at given index is start sample.
int GetStatCount ( )

Stats are holding last execution time/duration of action.

They are used for actions that doesn't appear frequently, like file IO.

Returns:
Stats count. They are created when stat occurs, so open or save action needs to be done first to get any information stored in stats.
int GetStatIndex ( const char *  pName )

Search for index of given stat name.

Parameters:
pName Name of the sample that we are looking for.
Returns:
Stat index if found, -1 if not in the list.
const char* GetStatName ( int  pIndex )

Get information about what action is stat refering to.

Parameters:
pIndex Index of stat.
Returns:
Stat name.
const char* GetStatComment ( int  pIndex )

Get aditional information about what action is stat refering to.

Parameters:
pIndex Index of stat.
Returns:
Stat comment.
double GetStatDuration ( int  pIndex )

Get time that was spend on execution of action.

Parameters:
pIndex Index of stat.
Returns:
Stat duration (in seconds).
double GetProfilingCost ( )

Profiling collection can affect scene performace.

This function return how costly is profiling.

Returns:
Cost of profiling the scene. (in mini seconds)
static int RegisterTaskCycle ( const char *  pUniqueName,
float *  pColor = NULL 
) [static]

Register a new task cycle for profiling.

Pointer to name needs to stay valid during whole application session.

Parameters:
pUniqueName Unique name for new task cycle
pColor Color for new task cycle. Used in Profiling Center for drawing.
Returns:
Index of task cycle. Will return -1 if failed. If task cycle is already registered it will return its index.
static bool IsTaskCycleNameRegistered ( const char *  pName ) [static]

Test to see if a task cycle is already registered based on the name provided.

Can also be used to verify if a name is free to be used, this included checking any conflicts with internal names.

Parameters:
pName Task cycle name to test
Returns:
True when name is used. False when name is not used.
static FBProfiler& TheOne ( ) [static]

Get the global object for this class.

Returns:
the global object.

Member Data Documentation

FBPropertyProfilingMode ProfilingMode

Read/Write Property: Profiling collection modes, including disabling all profiling.

Definition at line 233 of file fbprofiler.h.

Read/Write Property: Specify the depth of evaluation profiling for data collection (maximum value is 10).

Definition at line 234 of file fbprofiler.h.

Read/Write Property: Buffer size for average and timing computation (maximum value 200).

Definition at line 235 of file fbprofiler.h.

Read/Write Property: Draw task cycles in relation to main thread cycle time - frame cycle (percentage display).

Definition at line 236 of file fbprofiler.h.

Read/Write Property: Activate the sampling for time events.

Call before quering for FBProfileTimeEvent.

Definition at line 237 of file fbprofiler.h.


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

FBProfiler FBProfiler FBProfiler FBProfiler FBProfiler FBProfiler FBProfiler FBProfiler FBProfiler FBProfiler
FBProfiler FBProfiler FBProfiler FBProfiler FBProfiler FBProfiler FBProfiler FBProfiler FBProfiler FBProfiler