MCPcopy Create free account
hub / github.com/NVIDIAGameWorks/Blast / SampleProfilerBegin

Function SampleProfilerBegin

samples/SampleBase/utils/SampleProfiler.cpp:72–90  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

70}
71
72void SampleProfilerBegin(const char* name)
73{
74 auto start = steady_clock::now();
75 {
76 Node* parent = s_currentNode;
77 if (s_currentNode == nullptr)
78 {
79 s_currentNode = &s_roots[name];
80 }
81 else
82 {
83 s_currentNode = &s_currentNode->childs[name];
84 }
85 s_currentNode->parent = parent;
86 s_currentNode->data.calls++;
87 s_currentNode->data.start = steady_clock::now();
88 }
89 s_overhead += duration_cast<microseconds>(steady_clock::now() - start);
90}
91
92void SampleProfilerEnd()
93{

Callers 1

SampleProfilerScopedMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected