OpenClonk
C4AulProfiler Class Reference

#include <C4AulExec.h>

Static Public Member Functions

static void Abort ()
 
static void StartProfiling (C4ScriptHost *pScript)
 
static void StopProfiling ()
 

Detailed Description

Definition at line 235 of file C4AulExec.h.

Member Function Documentation

◆ Abort()

static void C4AulProfiler::Abort ( )
inlinestatic

Definition at line 257 of file C4AulExec.h.

257 { AulExec.StopProfiling(); }
C4AulExec AulExec
Definition: C4AulExec.cpp:29

References AulExec.

Referenced by C4Game::Clear(), and C4Game::ReloadDef().

Here is the caller graph for this function:

◆ StartProfiling()

void C4AulProfiler::StartProfiling ( C4ScriptHost pScript)
static

Definition at line 963 of file C4AulExec.cpp.

964 {
965  AulExec.StartProfiling(pScript);
966  if(pScript)
967  ResetTimes(pScript->GetPropList());
968  else
969  ResetTimes();
970 }
C4AulExec AulExec
Definition: C4AulExec.cpp:29
virtual C4PropListStatic * GetPropList()
Definition: C4ScriptHost.h:51

References AulExec, and C4ScriptHost::GetPropList().

Here is the call graph for this function:

◆ StopProfiling()

void C4AulProfiler::StopProfiling ( )
static

Definition at line 972 of file C4AulExec.cpp.

973 {
974  if (!AulExec.IsProfiling()) return;
975  AulExec.StopProfiling();
976  // collect profiler times
977  C4AulProfiler Profiler;
978  Profiler.CollectEntry(nullptr, AulExec.tDirectExecTotal);
979  if(AulExec.pProfiledScript)
980  Profiler.CollectTimes(AulExec.pProfiledScript->GetPropList());
981  else
982  Profiler.CollectTimes();
983  Profiler.Show();
984 }

References AulExec, and C4ScriptHost::GetPropList().

Here is the call graph for this function:

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