Support Forum       G3D Web Page     
Public Types | Public Member Functions | Friends | List of all members
G3D::Profiler::Event Class Reference

May have child Events. More...

Public Types

enum  { NONE = -1 }
 For the root's parent. More...
 

Public Member Functions

 Event ()
 
RealTime cpuDuration () const
 Time elapsed between when the CPU began processing this task and when it completed it, including the time consumed by its children. More...
 
RealTime endTime () const
 Unix time at which Profiler::endEvent() was called to create this event. More...
 
const Stringfile () const
 The name of the C++ file in which the event began. More...
 
RealTime gfxDuration () const
 Time elapsed between when the GPU began processing this task and when it completed it, including the time consumed by its children. More...
 
const size_t hash () const
 
const Stringhint () const
 
int isDummy () const
 Whether or not event is a generated dummy event. More...
 
int level () const
 Tree level, 0 == root. More...
 
int line () const
 The line number in file() at which the event began. More...
 
const Stringname () const
 The name provided for this event when it began. More...
 
int numChildren () const
 Number of child events. More...
 
bool operator!= (const String &name) const
 
bool operator== (const String &name) const
 
int parentIndex () const
 Index in the event tree of this node's parent, NONE if this is the root. More...
 
RealTime startTime () const
 Unix time at which Profiler::beginEvent() was called to create this event. More...
 

Friends

class Profiler
 

Detailed Description

May have child Events.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum

For the root's parent.

Enumerator
NONE 

Constructor & Destructor Documentation

◆ Event()

G3D::Profiler::Event::Event ( )
inline

Member Function Documentation

◆ cpuDuration()

RealTime G3D::Profiler::Event::cpuDuration ( ) const
inline

Time elapsed between when the CPU began processing this task and when it completed it, including the time consumed by its children.

◆ endTime()

RealTime G3D::Profiler::Event::endTime ( ) const
inline

Unix time at which Profiler::endEvent() was called to create this event.

◆ file()

const String& G3D::Profiler::Event::file ( ) const
inline

The name of the C++ file in which the event began.

◆ gfxDuration()

RealTime G3D::Profiler::Event::gfxDuration ( ) const
inline

Time elapsed between when the GPU began processing this task and when it completed it, including the time consumed by its children.

The GPU may have been idle for some of that time if it was blocked on the CPU or the event began before significant GPU calls were actually issued by the program.

◆ hash()

const size_t G3D::Profiler::Event::hash ( ) const
inline

◆ hint()

const String& G3D::Profiler::Event::hint ( ) const
inline

◆ isDummy()

int G3D::Profiler::Event::isDummy ( ) const
inline

Whether or not event is a generated dummy event.

◆ level()

int G3D::Profiler::Event::level ( ) const
inline

Tree level, 0 == root.

This information can be inferred from the tree structure but is easiest to directly query.

◆ line()

int G3D::Profiler::Event::line ( ) const
inline

The line number in file() at which the event began.

◆ name()

const String& G3D::Profiler::Event::name ( ) const
inline

The name provided for this event when it began.

For auto-generated shader events from LAUNCH_SHADER, this will be the name of the shader.

Note that event names are not necessarily unique. The location of an event within the tree is the only unique identification.

Referenced by operator!=(), and operator==().

◆ numChildren()

int G3D::Profiler::Event::numChildren ( ) const
inline

Number of child events.

Descendents are expanded in depth-first order.

◆ operator!=()

bool G3D::Profiler::Event::operator!= ( const String name) const
inline

◆ operator==()

bool G3D::Profiler::Event::operator== ( const String name) const
inline

◆ parentIndex()

int G3D::Profiler::Event::parentIndex ( ) const
inline

Index in the event tree of this node's parent, NONE if this is the root.

◆ startTime()

RealTime G3D::Profiler::Event::startTime ( ) const
inline

Unix time at which Profiler::beginEvent() was called to create this event.

Primarily useful for ordering events on a timeline.

See also
cpuDuration, gfxDuration, endTime

Friends And Related Function Documentation

◆ Profiler

friend class Profiler
friend

documentation generated on Wed Nov 24 2021 08:01:59 using doxygen 1.8.15