MCPcopy Create free account
hub / github.com/defold/defold / UpdateProfiler

Function UpdateProfiler

engine/profiler/src/profiler.cpp:1028–1044  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1026}
1027
1028static dmExtension::Result UpdateProfiler(dmExtension::Params* params)
1029{
1030 if (g_TrackCpuUsage)
1031 {
1032 dmProfilerExt::SampleCpuUsage();
1033 }
1034
1035 if (dLib::IsDebugMode()) {
1036 DM_PROPERTY_SET_U32(rmtp_CpuUsage, dmProfilerExt::GetCpuUsage()*100.0);
1037 uint64_t memory_usage = g_TrackDetailedMemory ? dmProfilerExt::GetDetailedMemoryUsage() : dmProfilerExt::GetMemoryUsage();
1038 DM_PROPERTY_SET_U32(rmtp_Memory, memory_usage / 1024u);
1039 }
1040
1041 dmProfilerExt::UpdatePlatformProfiler();
1042
1043 return dmExtension::RESULT_OK;
1044}
1045
1046static ExtensionResult PreRenderProfiler(dmExtension::Params* params)
1047{

Callers

nothing calls this directly

Calls 1

IsDebugModeFunction · 0.85

Tested by

no test coverage detected