mirror of
https://github.com/wolfpld/tracy.git
synced 2025-03-20 07:40:02 +08:00
Add total time percentage for entries in sampling statistics.
This commit is contained in:
parent
e438e1c53d
commit
4fa049188b
@ -11228,8 +11228,8 @@ void View::DrawStatistics()
|
|||||||
widthSet = true;
|
widthSet = true;
|
||||||
ImGui::SetColumnWidth( 0, w * 0.3f );
|
ImGui::SetColumnWidth( 0, w * 0.3f );
|
||||||
ImGui::SetColumnWidth( 1, w * 0.45f );
|
ImGui::SetColumnWidth( 1, w * 0.45f );
|
||||||
ImGui::SetColumnWidth( 2, w * 0.15f );
|
ImGui::SetColumnWidth( 2, w * 0.125f );
|
||||||
ImGui::SetColumnWidth( 3, w * 0.1f );
|
ImGui::SetColumnWidth( 3, w * 0.125f );
|
||||||
}
|
}
|
||||||
ImGui::TextUnformatted( "Name" );
|
ImGui::TextUnformatted( "Name" );
|
||||||
ImGui::NextColumn();
|
ImGui::NextColumn();
|
||||||
@ -11323,6 +11323,10 @@ void View::DrawStatistics()
|
|||||||
{
|
{
|
||||||
ImGui::TextUnformatted( RealToString( cnt ) );
|
ImGui::TextUnformatted( RealToString( cnt ) );
|
||||||
}
|
}
|
||||||
|
char buf[64];
|
||||||
|
PrintStringPercent( buf, 100. * cnt / m_worker.GetCallstackSampleCount() );
|
||||||
|
ImGui::SameLine();
|
||||||
|
TextDisabledUnformatted( buf );
|
||||||
ImGui::NextColumn();
|
ImGui::NextColumn();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user