Commit e7c950eb authored by Ulf Hermann's avatar Ulf Hermann

QmlProfiler: In statistics use non-recursive time as total

Otherwise the percentages and totals don't match. The extra recursive
time is shown in the tooltip, without percentage (as there wouldn't be a
sensible base value for a percentage number).

Change-Id: I47fcf92aac3f60554219f7da9dd2ac90061ce496
Reviewed-by: Riitta-Leena Miettinen's avatarLeena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Christian Kandeler's avatarChristian Kandeler <christian.kandeler@qt.io>
parent 0cbb78e4
......@@ -578,9 +578,8 @@ void QmlProfilerStatisticsMainView::updateNotes(int typeIndex)
item->setToolTip(it.value());
} else if (stats.durationRecursive > 0) {
item->setBackground(colors()->noteBackground);
item->setToolTip(tr("%1 / %2% of total in recursive calls")
.arg(Timeline::formatTime(stats.durationRecursive))
.arg(stats.durationRecursive * 100l / stats.duration));
item->setToolTip(tr("+%1 in recursive calls")
.arg(Timeline::formatTime(stats.durationRecursive)));
} else if (!item->toolTip().isEmpty()){
item->setBackground(colors()->defaultBackground);
item->setToolTip(QString());
......@@ -619,8 +618,9 @@ void QmlProfilerStatisticsMainView::parseModel()
}
if (d->m_fieldShown[TotalTime]) {
newRow << new StatisticsViewItem(Timeline::formatTime(stats.duration),
stats.duration);
newRow << new StatisticsViewItem(
Timeline::formatTime(stats.duration - stats.durationRecursive),
stats.duration - stats.durationRecursive);
}
if (d->m_fieldShown[SelfTimeInPercent]) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment