From 4fa049188b0b6e36e515a714c6320f2438c1915b Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Thu, 27 Feb 2020 17:05:56 +0100 Subject: [PATCH] Add total time percentage for entries in sampling statistics. --- server/TracyView.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/server/TracyView.cpp b/server/TracyView.cpp index 7b8f154a..4808192c 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -11228,8 +11228,8 @@ void View::DrawStatistics() widthSet = true; ImGui::SetColumnWidth( 0, w * 0.3f ); ImGui::SetColumnWidth( 1, w * 0.45f ); - ImGui::SetColumnWidth( 2, w * 0.15f ); - ImGui::SetColumnWidth( 3, w * 0.1f ); + ImGui::SetColumnWidth( 2, w * 0.125f ); + ImGui::SetColumnWidth( 3, w * 0.125f ); } ImGui::TextUnformatted( "Name" ); ImGui::NextColumn(); @@ -11323,6 +11323,10 @@ void View::DrawStatistics() { ImGui::TextUnformatted( RealToString( cnt ) ); } + char buf[64]; + PrintStringPercent( buf, 100. * cnt / m_worker.GetCallstackSampleCount() ); + ImGui::SameLine(); + TextDisabledUnformatted( buf ); ImGui::NextColumn(); } }