mirror of
https://github.com/wolfpld/tracy.git
synced 2025-03-20 07:40:02 +08:00
Calculate total time spent in source location.
This simple solution doesn't handle recursion at all.
This commit is contained in:
@@ -1271,6 +1271,7 @@ void Worker::ProcessZoneEnd( const QueueZoneEnd& ev )
|
||||
assert( it != m_data.sourceLocationZones.end() );
|
||||
it->second.min = std::min( it->second.min, timeSpan );
|
||||
it->second.max = std::max( it->second.max, timeSpan );
|
||||
it->second.total += timeSpan;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@@ -1671,6 +1672,7 @@ void Worker::ReadTimeline( FileRead& f, Vector<ZoneEvent*>& vec, uint16_t thread
|
||||
{
|
||||
it->second.min = std::min( it->second.min, timeSpan );
|
||||
it->second.max = std::max( it->second.max, timeSpan );
|
||||
it->second.total += timeSpan;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user