1
0
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:
Bartosz Taudul
2018-03-24 14:24:30 +01:00
parent 40a14292b3
commit a9e1a9bddb
2 changed files with 8 additions and 1 deletions
+2
View File
@@ -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