From 453f2c1871243fc422d700a824ec2c9dc63722d5 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Tue, 12 May 2026 00:25:09 +0200 Subject: [PATCH] Display child calls time as a percentage. --- profiler/src/profiler/TracySourceView.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/profiler/src/profiler/TracySourceView.cpp b/profiler/src/profiler/TracySourceView.cpp index 55c7d2b9..74075e68 100644 --- a/profiler/src/profiler/TracySourceView.cpp +++ b/profiler/src/profiler/TracySourceView.cpp @@ -1094,8 +1094,11 @@ void SourceView::RenderSymbolView( Worker& worker, View& view ) } if( as.ipTotalAsm.ext ) { + char buf[32]; + auto end = PrintFloat( buf, buf+32, as.ipTotalAsm.ext * 100.f / ( as.ipTotalAsm.local + as.ipTotalAsm.ext ), 2 ); + *end = '\0'; ImGui::SameLine(); - ImGui::TextDisabled( "(%c%s)", m_childCalls ? '-' : '+', TimeToString( as.ipTotalAsm.ext * worker.GetSamplingPeriod() ) ); + ImGui::TextDisabled( "(%c%s / %s%%)", m_childCalls ? '-' : '+', TimeToString( as.ipTotalAsm.ext * worker.GetSamplingPeriod() ), buf ); TooltipIfHovered( "Child call samples" ); } ImGui::SameLine();