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

Method _profile_native_call

modules/gdscript/gdscript_vm.cpp:113–122  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

111}
112
113void GDScriptFunction::_profile_native_call(uint64_t p_t_taken, const String &p_func_name, const String &p_instance_class_name) {
114 HashMap<String, Profile::NativeProfile>::Iterator inner_prof = profile.native_calls.find(p_func_name);
115 if (inner_prof) {
116 inner_prof->value.call_count += 1;
117 } else {
118 String sig = vformat("%s::0::%s%s%s", get_script()->get_script_path(), p_instance_class_name, p_instance_class_name.is_empty() ? "" : ".", p_func_name);
119 inner_prof = profile.native_calls.insert(p_func_name, Profile::NativeProfile{ 1, 0, sig });
120 }
121 inner_prof->value.total_time += p_t_taken;
122}
123
124#endif // DEBUG_ENABLED
125

Callers

nothing calls this directly

Calls 6

vformatFunction · 0.85
get_scriptFunction · 0.85
get_script_pathMethod · 0.80
findMethod · 0.45
is_emptyMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected