mirror of
https://github.com/wolfpld/tracy
synced 2025-04-29 04:23:51 +00:00
Don't print zero sample counts in tooltips.
This commit is contained in:
parent
5f97c484f1
commit
50a1faa880
@ -1153,8 +1153,8 @@ void SourceView::RenderSymbolView( const Worker& worker, View& view )
|
|||||||
if( ImGui::IsItemHovered() )
|
if( ImGui::IsItemHovered() )
|
||||||
{
|
{
|
||||||
ImGui::BeginTooltip();
|
ImGui::BeginTooltip();
|
||||||
TextFocused( "Local time:", TimeToString( iptotalAsm.local * worker.GetSamplingPeriod() ) );
|
if( iptotalAsm.local != 0 ) TextFocused( "Local time:", TimeToString( iptotalAsm.local * worker.GetSamplingPeriod() ) );
|
||||||
TextFocused( "Child time:", TimeToString( iptotalAsm.ext * worker.GetSamplingPeriod() ) );
|
if( iptotalAsm.ext != 0 ) TextFocused( "Child time:", TimeToString( iptotalAsm.ext * worker.GetSamplingPeriod() ) );
|
||||||
ImGui::EndTooltip();
|
ImGui::EndTooltip();
|
||||||
}
|
}
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
@ -1171,8 +1171,8 @@ void SourceView::RenderSymbolView( const Worker& worker, View& view )
|
|||||||
if( ImGui::IsItemHovered() )
|
if( ImGui::IsItemHovered() )
|
||||||
{
|
{
|
||||||
ImGui::BeginTooltip();
|
ImGui::BeginTooltip();
|
||||||
TextFocused( "Local samples:", RealToString( iptotalAsm.local ) );
|
if( iptotalAsm.local != 0 ) TextFocused( "Local samples:", RealToString( iptotalAsm.local ) );
|
||||||
TextFocused( "Child samples:", RealToString( iptotalAsm.ext ) );
|
if( iptotalAsm.ext != 0 ) TextFocused( "Child samples:", RealToString( iptotalAsm.ext ) );
|
||||||
ImGui::EndTooltip();
|
ImGui::EndTooltip();
|
||||||
}
|
}
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
@ -1434,10 +1434,10 @@ void SourceView::RenderSymbolSourceView( uint32_t iptotal, const unordered_flat_
|
|||||||
if( ImGui::IsItemHovered() )
|
if( ImGui::IsItemHovered() )
|
||||||
{
|
{
|
||||||
ImGui::BeginTooltip();
|
ImGui::BeginTooltip();
|
||||||
TextFocused( "Local time:", TimeToString( fit->second.local * worker.GetSamplingPeriod() ) );
|
if( fit->second.local ) TextFocused( "Local time:", TimeToString( fit->second.local * worker.GetSamplingPeriod() ) );
|
||||||
TextFocused( "Child time:", TimeToString( fit->second.ext * worker.GetSamplingPeriod() ) );
|
if( fit->second.ext ) TextFocused( "Child time:", TimeToString( fit->second.ext * worker.GetSamplingPeriod() ) );
|
||||||
TextFocused( "Local samples:", RealToString( fit->second.local ) );
|
if( fit->second.local ) TextFocused( "Local samples:", RealToString( fit->second.local ) );
|
||||||
TextFocused( "Child samples:", RealToString( fit->second.ext ) );
|
if( fit->second.ext ) TextFocused( "Child samples:", RealToString( fit->second.ext ) );
|
||||||
ImGui::EndTooltip();
|
ImGui::EndTooltip();
|
||||||
}
|
}
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user