Display child time and samples in symbol stats.

This commit is contained in:
Bartosz Taudul 2021-04-18 19:10:39 +02:00
parent c5eb398319
commit 526d0cd22a
No known key found for this signature in database
GPG Key ID: B7FE2008B7575DF3

View File

@ -1142,11 +1142,39 @@ void SourceView::RenderSymbolView( const Worker& worker, View& view )
ImGui::SameLine(); ImGui::SameLine();
ImGui::Spacing(); ImGui::Spacing();
ImGui::SameLine(); ImGui::SameLine();
if( m_childCalls )
{
TextFocused( ICON_FA_STOPWATCH " Time:", TimeToString( ( iptotalAsm.local + iptotalAsm.ext ) * worker.GetSamplingPeriod() ) );
}
else
{
TextFocused( ICON_FA_STOPWATCH " Time:", TimeToString( iptotalAsm.local * worker.GetSamplingPeriod() ) ); TextFocused( ICON_FA_STOPWATCH " Time:", TimeToString( iptotalAsm.local * worker.GetSamplingPeriod() ) );
}
if( ImGui::IsItemHovered() )
{
ImGui::BeginTooltip();
TextFocused( "Local time:", TimeToString( iptotalAsm.local * worker.GetSamplingPeriod() ) );
TextFocused( "Child time:", TimeToString( iptotalAsm.ext * worker.GetSamplingPeriod() ) );
ImGui::EndTooltip();
}
ImGui::SameLine(); ImGui::SameLine();
ImGui::Spacing(); ImGui::Spacing();
ImGui::SameLine(); ImGui::SameLine();
if( m_childCalls )
{
TextFocused( ICON_FA_EYE_DROPPER " Samples:", RealToString( iptotalAsm.local + iptotalAsm.ext ) );
}
else
{
TextFocused( ICON_FA_EYE_DROPPER " Samples:", RealToString( iptotalAsm.local ) ); TextFocused( ICON_FA_EYE_DROPPER " Samples:", RealToString( iptotalAsm.local ) );
}
if( ImGui::IsItemHovered() )
{
ImGui::BeginTooltip();
TextFocused( "Local samples:", RealToString( iptotalAsm.local ) );
TextFocused( "Child samples:", RealToString( iptotalAsm.ext ) );
ImGui::EndTooltip();
}
ImGui::SameLine(); ImGui::SameLine();
ImGui::Spacing(); ImGui::Spacing();
ImGui::SameLine(); ImGui::SameLine();