22#ifndef INCLUDED_PROFILE
23#define INCLUDED_PROFILE
33#define PROFILE_AMORTIZE_FRAMES 30
34#define PROFILE_AMORTIZE_TURNS 5
120 void Start(
const char* name );
148#define g_Profiler CProfileManager::GetSingleton()
159#define PROFILE(name) CProfileSample __profile(name)
161#define PROFILE_START(name) { CProfileSample __profile(name)
162#define PROFILE_END(name) }
165#define PROFILE3(name) PROFILE(name); PROFILE2(name)
168#define PROFILE3_GPU(name) PROFILE(name); PROFILE2(name); PROFILE2_GPU(name)
New profiler (complementing the older CProfileManager)
Definition: Profile.h:114
const CProfileNode * GetCurrent()
Definition: Profile.h:136
void Turn()
Definition: Profile.cpp:449
const CProfileNode * GetRoot()
Definition: Profile.h:137
void Start(const char *name)
Definition: Profile.cpp:409
void PerformStructuralReset()
Definition: Profile.cpp:464
void Stop()
Definition: Profile.cpp:423
CProfileNode * root
Definition: Profile.h:140
CProfileManager()
Definition: Profile.cpp:398
~CProfileManager()
Definition: Profile.cpp:404
CProfileNode * current
Definition: Profile.h:141
void Reset()
Definition: Profile.cpp:429
void StructuralReset()
Definition: Profile.cpp:454
void StartScript(const char *name)
Definition: Profile.cpp:416
void Frame()
Definition: Profile.cpp:434
bool needs_structural_reset
Definition: Profile.h:143
Class CProfileNodeTable: Implement ProfileViewer's AbstractProfileTable interface in order to display...
Definition: Profile.cpp:42
std::vector< CProfileNode * >::const_iterator const_profile_iterator
Definition: Profile.h:54
void Reset()
Definition: Profile.cpp:328
CProfileNodeTable * display_table
Definition: Profile.h:110
const char * GetName() const
Definition: Profile.h:59
void Call()
Definition: Profile.cpp:377
RingBuf< double, PROFILE_AMORTIZE_TURNS > time_per_turn
Definition: Profile.h:102
const CProfileNode * GetChild(const char *name) const
Definition: Profile.cpp:279
std::vector< CProfileNode * > script_children
Definition: Profile.h:109
int recursion
Definition: Profile.h:105
double time_frame_current
Definition: Profile.h:99
RingBuf< int, PROFILE_AMORTIZE_TURNS > calls_per_turn
Definition: Profile.h:97
bool CanExpand()
Definition: Profile.cpp:323
double GetTurnTime() const
Definition: Profile.cpp:274
RingBuf< double, PROFILE_AMORTIZE_FRAMES > time_per_frame
Definition: Profile.h:101
double GetTurnCalls() const
Definition: Profile.cpp:269
std::vector< CProfileNode * > children
Definition: Profile.h:108
void Frame()
Definition: Profile.cpp:347
CProfileNode * GetParent() const
Definition: Profile.h:75
NONCOPYABLE(CProfileNode)
const std::vector< CProfileNode * > * GetScriptChildren() const
Definition: Profile.h:69
RingBuf< int, PROFILE_AMORTIZE_FRAMES > calls_per_frame
Definition: Profile.h:96
bool Return()
Definition: Profile.cpp:387
const char * name
Definition: Profile.h:92
double start
Definition: Profile.h:104
double GetFrameTime() const
Definition: Profile.cpp:264
double GetFrameCalls() const
Definition: Profile.cpp:259
CProfileNode(const char *name, CProfileNode *parent)
Definition: Profile.cpp:228
CProfileNode * parent
Definition: Profile.h:107
const CProfileNode * GetScriptChild(const char *name) const
Definition: Profile.cpp:289
const std::vector< CProfileNode * > * GetChildren() const
Definition: Profile.h:68
int calls_turn_current
Definition: Profile.h:95
std::vector< CProfileNode * >::iterator profile_iterator
Definition: Profile.h:53
int calls_frame_current
Definition: Profile.h:94
double time_turn_current
Definition: Profile.h:100
~CProfileNode()
Definition: Profile.cpp:240
void Turn()
Definition: Profile.cpp:362
Definition: Profile.h:151
~CProfileSample()
Definition: Profile.cpp:483
CProfileSample(const char *name)
Definition: Profile.cpp:473
Template base class for singletons.
Definition: Singleton.h:34