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 );
121 void StartScript(
const char* name );
134 void StructuralReset();
145 void PerformStructuralReset();
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) 170 #endif // INCLUDED_PROFILE double GetFrameCalls() const
Definition: Profile.cpp:259
RingBuf< double, PROFILE_AMORTIZE_TURNS > time_per_turn
Definition: Profile.h:102
RingBuf< int, PROFILE_AMORTIZE_TURNS > calls_per_turn
Definition: Profile.h:97
void Turn()
Definition: Profile.cpp:362
bool Return()
Definition: Profile.cpp:387
const std::vector< CProfileNode * > * GetScriptChildren() const
Definition: Profile.h:69
const CProfileNode * GetCurrent()
Definition: Profile.h:136
RingBuf< int, PROFILE_AMORTIZE_FRAMES > calls_per_frame
Definition: Profile.h:96
const CProfileNode * GetScriptChild(const char *name) const
Definition: Profile.cpp:289
CProfileNode * parent
Definition: Profile.h:107
CProfileNode * GetParent() const
Definition: Profile.h:75
std::vector< CProfileNode * > children
Definition: Profile.h:108
const CProfileNode * GetRoot()
Definition: Profile.h:137
double time_turn_current
Definition: Profile.h:100
double start
Definition: Profile.h:104
int calls_turn_current
Definition: Profile.h:95
Class CProfileNodeTable: Implement ProfileViewer's AbstractProfileTable interface in order to display...
Definition: Profile.cpp:41
void Frame()
Definition: Profile.cpp:347
~CProfileNode()
Definition: Profile.cpp:240
NONCOPYABLE(CProfileNode)
CProfileNodeTable * display_table
Definition: Profile.h:110
CProfileNode * root
Definition: Profile.h:140
Definition: Profile.h:150
double GetFrameTime() const
Definition: Profile.cpp:264
int recursion
Definition: Profile.h:105
std::vector< CProfileNode * >::const_iterator const_profile_iterator
Definition: Profile.h:54
bool needs_structural_reset
Definition: Profile.h:143
New profiler (complementing the older CProfileManager)
CProfileNode * current
Definition: Profile.h:141
Definition: Profile.h:113
double GetTurnTime() const
Definition: Profile.cpp:274
void Call()
Definition: Profile.cpp:377
const char * GetName() const
Definition: Profile.h:59
double time_frame_current
Definition: Profile.h:99
friend class CProfileManager
Definition: Profile.h:89
RingBuf< double, PROFILE_AMORTIZE_FRAMES > time_per_frame
Definition: Profile.h:101
CProfileNode(const char *name, CProfileNode *parent)
Definition: Profile.cpp:228
void Reset()
Definition: Profile.cpp:328
int calls_frame_current
Definition: Profile.h:94
Template base class for singletons.
Definition: Singleton.h:33
const char * name
Definition: Profile.h:92
double GetTurnCalls() const
Definition: Profile.cpp:269
std::vector< CProfileNode * > script_children
Definition: Profile.h:109
bool CanExpand()
Definition: Profile.cpp:323
const std::vector< CProfileNode * > * GetChildren() const
Definition: Profile.h:68
std::vector< CProfileNode * >::iterator profile_iterator
Definition: Profile.h:53
const CProfileNode * GetChild(const char *name) const
Definition: Profile.cpp:279