MCPcopy Create free account
hub / github.com/DaedalusX64/daedalus / Enter

Method Enter

Source/Utility/Profiler.cpp:325–341  ·  view source on GitHub ↗

Start profiling for an item

Source from the content-addressed store, hash-verified

323
324// Start profiling for an item
325void CProfilerImpl::Enter( SProfileItemHandle handle )
326{
327 DAEDALUS_ASSERT( handle.Handle < mItems.size(), "Invalid handle!" );
328 DAEDALUS_ASSERT( mActiveCallstacks.size() == mActiveItems.size(), "Why are there different numbers of callstacks/items?" );
329
330 CProfileItem * item = mItems[ handle.Handle ];
331
332 mActiveItems.push_back( item );
333
334 CProfileCallstack * callstack = GetActiveStats();
335
336 mActiveCallstacks.push_back( callstack );
337
338 callstack->StartTiming();
339
340 DAEDALUS_ASSERT( mActiveCallstacks.size() == mActiveItems.size(), "Why are there different numbers of callstacks/items?" );
341}
342
343// Stop profiling for an item
344void CProfilerImpl::Exit( SProfileItemHandle handle )

Callers 1

CAutoProfileMethod · 0.45

Calls 2

sizeMethod · 0.80
StartTimingMethod · 0.80

Tested by

no test coverage detected