From a2c4f8c2d108d7fd4de8dca7dd25ca04da21e10f Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Mon, 13 Apr 2020 14:41:05 +0200 Subject: [PATCH] Prominently expose profiler memory usage. --- server/TracyView.cpp | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/server/TracyView.cpp b/server/TracyView.cpp index 659a3c8c..72230392 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -642,6 +642,14 @@ bool View::DrawImpl() ImGui::Text( "Time span" ); ImGui::EndTooltip(); } + ImGui::SameLine(); + ImGui::Text( ICON_FA_MEMORY " %-10s", MemSizeToString( memUsage ) ); + if( ImGui::IsItemHovered() ) + { + ImGui::BeginTooltip(); + ImGui::Text( "Profiler memory usage" ); + ImGui::EndTooltip(); + } DrawNotificationArea(); m_frameHover = -1; @@ -945,8 +953,6 @@ bool View::DrawConnection() TextFocused( "+", RealToString( m_worker.GetSendInFlight() ) ); } - TextFocused( "Memory usage:", MemSizeToString( memUsage ) ); - const auto wpos = ImGui::GetWindowPos() + ImGui::GetWindowContentRegionMin(); ImGui::GetWindowDrawList()->AddCircleFilled( wpos + ImVec2( 1 + cs * 0.5, 3 + ty * 1.75 ), cs * 0.5, m_worker.IsConnected() ? 0xFF2222CC : 0xFF444444, 10 ); @@ -12277,13 +12283,6 @@ void View::DrawInfo() ImGui::Separator(); ImGui::BeginChild( "##info" ); - if( ImGui::TreeNode( "Profiler statistics" ) ) - { - TextFocused( "Profiler memory usage:", MemSizeToString( memUsage ) ); - TextFocused( "Profiler FPS:", RealToString( int( io.Framerate ) ) ); - ImGui::TreePop(); - } - const auto ficnt = m_worker.GetFrameImageCount(); if( ImGui::TreeNode( "Trace statistics" ) ) { @@ -12927,6 +12926,9 @@ void View::DrawInfo() } } + ImGui::Separator(); + TextFocused( "Profiler FPS:", RealToString( int( io.Framerate ) ) ); + ImGui::Separator(); TextFocused( "PID:", RealToString( m_worker.GetPid() ) ); TextFocused( "Host info:", m_worker.GetHostInfo().c_str() );