Fix #9398 (Incorrect "Overall Time" in timing info) (#5173)

This commit is contained in:
Daniel Marjamäki 2023-06-20 10:31:11 +02:00 committed by GitHub
parent 4f3cc168d1
commit e8de2aeeea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -60,6 +60,10 @@ void TimerResults::showResults(SHOWTIME_MODES mode) const
const double secAverage = sec / (double)(iter->second.mNumberOfResults);
bool hasParent = false;
{
// Do not use valueFlow.. in "Overall time" because those are included in Tokenizer already
if (iter->first.compare(0,9,"valueFlow") == 0)
hasParent = true;
// Do not use inner timers in "Overall time"
const std::string::size_type pos = iter->first.rfind("::");
if (pos != std::string::npos)