NWNX:EE  8193.36.12
nwnx_profiler.nss
Go to the documentation of this file.
1 #include "nwnx"
7 
8 const string NWNX_Profiler = "NWNX_Profiler";
9 
32 void NWNX_Profiler_PushPerfScope(string name, string tag0_tag = "", string tag0_value = "");
33 
37 
39 
40 void NWNX_Profiler_PushPerfScope(string name, string tag0_tag = "", string tag0_value = "")
41 {
42  string sFunc = "PushPerfScope";
43 
45 
46  if (tag0_value != "" && tag0_tag != "")
47  {
48  NWNX_PushArgumentString(tag0_value);
49  NWNX_PushArgumentString(tag0_tag);
50  }
51 
52  NWNX_CallFunction(NWNX_Profiler, sFunc);
53 }
54 
56 {
57  string sFunc = "PopPerfScope";
58 
59  NWNX_CallFunction(NWNX_Profiler, sFunc);
60 }
NWNX_Profiler_PushPerfScope
void NWNX_Profiler_PushPerfScope(string name, string tag0_tag="", string tag0_value="")
Push a timing metric scope - note that every push must be matched by a corresponding pop.
Definition: nwnx_profiler.nss:40
NWNX_CallFunction
void NWNX_CallFunction(string pluginName, string functionName)
Scripting interface to NWNX.
Definition: nwnx.nss:54
NWNX_PushArgumentString
void NWNX_PushArgumentString(string value)
Pushes the specified type to the c++ side.
Definition: nwnx.nss:74
NWNX_Profiler_PopPerfScope
void NWNX_Profiler_PopPerfScope()
Pops a timing metric.
Definition: nwnx_profiler.nss:55