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

Function DumpThread

engine/profiler/src/profiler_render.cpp:1005–1020  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1003 }
1004
1005 static void DumpThread(ProfilerThread* thread)
1006 {
1007 const float ticks_per_second = 1000000.0f;
1008 float frame_time_f = thread->m_SamplesTotalTime / ticks_per_second;
1009 dmLogInfo("%sThread '%s': %f", GetIndent(1), dmHashReverseSafe32(thread->m_NameHash), frame_time_f);
1010
1011 uint32_t num_samples = thread->m_Samples.Size();
1012 for (uint32_t i = 0; i < num_samples; ++i)
1013 {
1014 ProfilerSample& sample = thread->m_Samples[i];
1015 float time = (sample.m_Time * 1000) / (float)ticks_per_second; // in milliseconds
1016 float self_time = (sample.m_SelfTime * 1000) / (float)ticks_per_second; // in milliseconds
1017
1018 dmLogInfo("%s'%s': time: %.3f ms self: %.3f ms count: %u", GetIndent(sample.m_Indent+1), dmHashReverseSafe32(sample.m_NameHash), time, self_time, sample.m_Count);
1019 }
1020 }
1021
1022 static void DumpProperties(ProfilerFrame* frame)
1023 {

Callers 1

DumpFrameFunction · 0.85

Calls 3

GetIndentFunction · 0.85
dmHashReverseSafe32Function · 0.85
SizeMethod · 0.45

Tested by

no test coverage detected