Prominently expose profiler memory usage.

This commit is contained in:
Bartosz Taudul 2020-04-13 14:41:05 +02:00
parent b389ccbb38
commit a2c4f8c2d1

View File

@ -642,6 +642,14 @@ bool View::DrawImpl()
ImGui::Text( "Time span" ); ImGui::Text( "Time span" );
ImGui::EndTooltip(); 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(); DrawNotificationArea();
m_frameHover = -1; m_frameHover = -1;
@ -945,8 +953,6 @@ bool View::DrawConnection()
TextFocused( "+", RealToString( m_worker.GetSendInFlight() ) ); TextFocused( "+", RealToString( m_worker.GetSendInFlight() ) );
} }
TextFocused( "Memory usage:", MemSizeToString( memUsage ) );
const auto wpos = ImGui::GetWindowPos() + ImGui::GetWindowContentRegionMin(); 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 ); 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::Separator();
ImGui::BeginChild( "##info" ); 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(); const auto ficnt = m_worker.GetFrameImageCount();
if( ImGui::TreeNode( "Trace statistics" ) ) if( ImGui::TreeNode( "Trace statistics" ) )
{ {
@ -12927,6 +12926,9 @@ void View::DrawInfo()
} }
} }
ImGui::Separator();
TextFocused( "Profiler FPS:", RealToString( int( io.Framerate ) ) );
ImGui::Separator(); ImGui::Separator();
TextFocused( "PID:", RealToString( m_worker.GetPid() ) ); TextFocused( "PID:", RealToString( m_worker.GetPid() ) );
TextFocused( "Host info:", m_worker.GetHostInfo().c_str() ); TextFocused( "Host info:", m_worker.GetHostInfo().c_str() );