MCPcopy Create free account
hub / github.com/Redot-Engine/redot-engine / profiling_start

Method profiling_start

modules/gdscript/gdscript.cpp:2382–2404  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2380}
2381
2382void GDScriptLanguage::profiling_start() {
2383#ifdef DEBUG_ENABLED
2384 MutexLock lock(mutex);
2385
2386 SelfList<GDScriptFunction> *elem = function_list.first();
2387 while (elem) {
2388 elem->self()->profile.call_count.set(0);
2389 elem->self()->profile.self_time.set(0);
2390 elem->self()->profile.total_time.set(0);
2391 elem->self()->profile.frame_call_count.set(0);
2392 elem->self()->profile.frame_self_time.set(0);
2393 elem->self()->profile.frame_total_time.set(0);
2394 elem->self()->profile.last_frame_call_count = 0;
2395 elem->self()->profile.last_frame_self_time = 0;
2396 elem->self()->profile.last_frame_total_time = 0;
2397 elem->self()->profile.native_calls.clear();
2398 elem->self()->profile.last_native_calls.clear();
2399 elem = elem->next();
2400 }
2401
2402 profiling = true;
2403#endif
2404}
2405
2406void GDScriptLanguage::profiling_set_save_native_calls(bool p_enable) {
2407#ifdef DEBUG_ENABLED

Callers 2

toggleMethod · 0.45
toggleMethod · 0.45

Calls 5

firstMethod · 0.80
selfMethod · 0.80
setMethod · 0.45
clearMethod · 0.45
nextMethod · 0.45

Tested by

no test coverage detected