mirror of
https://github.com/wolfpld/tracy.git
synced 2025-03-20 07:40:02 +08:00
Don't use source location data before it's ready.
This commit is contained in:
parent
e0105451f6
commit
5429f04614
@ -12182,9 +12182,12 @@ void View::ZoneTooltip( const ZoneEvent& ev )
|
|||||||
ImGui::Separator();
|
ImGui::Separator();
|
||||||
TextFocused( "Execution time:", TimeToString( ztime ) );
|
TextFocused( "Execution time:", TimeToString( ztime ) );
|
||||||
#ifndef TRACY_NO_STATISTICS
|
#ifndef TRACY_NO_STATISTICS
|
||||||
auto& zoneData = m_worker.GetZonesForSourceLocation( ev.SrcLoc() );
|
if( m_worker.AreSourceLocationZonesReady() )
|
||||||
ImGui::SameLine();
|
{
|
||||||
ImGui::TextDisabled( "(%.2f%% of average time)", float( ztime ) / zoneData.total * zoneData.zones.size() * 100 );
|
auto& zoneData = m_worker.GetZonesForSourceLocation( ev.SrcLoc() );
|
||||||
|
ImGui::SameLine();
|
||||||
|
ImGui::TextDisabled( "(%.2f%% of average time)", float( ztime ) / zoneData.total * zoneData.zones.size() * 100 );
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
TextFocused( "Self time:", TimeToString( selftime ) );
|
TextFocused( "Self time:", TimeToString( selftime ) );
|
||||||
if( ztime != 0 )
|
if( ztime != 0 )
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user