One more place to check if srcloc zones are ready.

This commit is contained in:
Bartosz Taudul 2019-09-29 20:17:47 +02:00
parent 873d536845
commit 59632f0d37

View File

@ -5386,9 +5386,12 @@ void View::DrawZoneInfoWindow()
TextFocused( "Time from start of program:", TimeToString( ev.Start() ) );
TextFocused( "Execution time:", TimeToString( ztime ) );
#ifndef TRACY_NO_STATISTICS
auto& zoneData = m_worker.GetZonesForSourceLocation( ev.SrcLoc() );
ImGui::SameLine();
ImGui::TextDisabled( "(%.2f%% of average time)", float( ztime ) / zoneData.total * zoneData.zones.size() * 100 );
if( m_worker.AreSourceLocationZonesReady() )
{
auto& zoneData = m_worker.GetZonesForSourceLocation( ev.SrcLoc() );
ImGui::SameLine();
ImGui::TextDisabled( "(%.2f%% of average time)", float( ztime ) / zoneData.total * zoneData.zones.size() * 100 );
}
#endif
TextFocused( "Self time:", TimeToString( selftime ) );
if( ztime != 0 )