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

Function DumpProperties

engine/profiler/src/profiler_render.cpp:1022–1045  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1020 }
1021
1022 static void DumpProperties(ProfilerFrame* frame)
1023 {
1024 uint32_t num_properties = frame->m_Properties.Size();
1025 for (uint32_t i = 0; i < num_properties; ++i)
1026 {
1027 const ProfilerProperty& property = frame->m_Properties[i];
1028
1029 char buffer[128];
1030 switch(property.m_Type)
1031 {
1032 case PROFILE_PROPERTY_TYPE_BOOL: dmSnPrintf(buffer, sizeof(buffer), "%s", property.m_Value.m_Bool?"True":"False"); break;
1033 case PROFILE_PROPERTY_TYPE_S32: dmSnPrintf(buffer, sizeof(buffer), "%d", property.m_Value.m_S32); break;
1034 case PROFILE_PROPERTY_TYPE_U32: dmSnPrintf(buffer, sizeof(buffer), "%u", property.m_Value.m_U32); break;
1035 case PROFILE_PROPERTY_TYPE_F32: dmSnPrintf(buffer, sizeof(buffer), "%f", property.m_Value.m_F32); break;
1036 case PROFILE_PROPERTY_TYPE_S64: dmSnPrintf(buffer, sizeof(buffer), "%lld", (long long)property.m_Value.m_S64); break;
1037 case PROFILE_PROPERTY_TYPE_U64: dmSnPrintf(buffer, sizeof(buffer), "%llx", (unsigned long long)property.m_Value.m_U64); break;
1038 case PROFILE_PROPERTY_TYPE_F64: dmSnPrintf(buffer, sizeof(buffer), "%g", property.m_Value.m_F64); break;
1039 case PROFILE_PROPERTY_TYPE_GROUP: dmSnPrintf(buffer, sizeof(buffer), ""); break;
1040 default: break;
1041 }
1042
1043 dmLogInfo("%s'%s': %s", GetIndent(property.m_Indent+1), dmHashReverseSafe32(property.m_NameHash), buffer);
1044 }
1045 }
1046
1047 void DumpFrame(ProfilerFrame* frame)
1048 {

Callers 1

DumpFrameFunction · 0.85

Calls 4

dmSnPrintfFunction · 0.85
GetIndentFunction · 0.85
dmHashReverseSafe32Function · 0.85
SizeMethod · 0.45

Tested by

no test coverage detected