Display zone exclusive time as progress bar.

This commit is contained in:
Bartosz Taudul 2018-03-19 02:30:40 +01:00
parent 3b34ebf544
commit 1fbe1621e7

View File

@ -2460,7 +2460,9 @@ void View::DrawZoneInfoWindow()
ImGui::Separator(); ImGui::Separator();
ImGui::Text( "Child zones: %s", RealToString( ev.child.size(), true ) ); ImGui::Text( "Child zones: %s", RealToString( ev.child.size(), true ) );
ImGui::NextColumn(); ImGui::NextColumn();
ImGui::Text( "Exclusive time: %s (%.2f%%)", TimeToString( ztime - ctime ), double( ztime - ctime ) / ztime * 100 ); char buf[128];
sprintf( buf, "Exclusive time: %s (%.2f%%)", TimeToString( ztime - ctime ), double( ztime - ctime ) / ztime * 100 );
ImGui::ProgressBar( double( ztime - ctime ) / ztime, ImVec2( -1, ty ), buf );
ImGui::NextColumn(); ImGui::NextColumn();
ImGui::Separator(); ImGui::Separator();
for( size_t i=0; i<ev.child.size(); i++ ) for( size_t i=0; i<ev.child.size(); i++ )
@ -2564,7 +2566,9 @@ void View::DrawGpuInfoWindow()
ImGui::Separator(); ImGui::Separator();
ImGui::Text( "Child zones: %s", RealToString( ev.child.size(), true ) ); ImGui::Text( "Child zones: %s", RealToString( ev.child.size(), true ) );
ImGui::NextColumn(); ImGui::NextColumn();
ImGui::Text( "Exclusive time: %s (%.2f%%)", TimeToString( ztime - ctime ), double( ztime - ctime ) / ztime * 100 ); char buf[128];
sprintf( buf, "Exclusive time: %s (%.2f%%)", TimeToString( ztime - ctime ), double( ztime - ctime ) / ztime * 100 );
ImGui::ProgressBar( double( ztime - ctime ) / ztime, ImVec2( -1, ty ), buf );
ImGui::NextColumn(); ImGui::NextColumn();
ImGui::Separator(); ImGui::Separator();
for( size_t i=0; i<ev.child.size(); i++ ) for( size_t i=0; i<ev.child.size(); i++ )