summaryrefslogtreecommitdiff
path: root/src/plugins/qmlprofiler/qmlprofilerstatisticsview.cpp
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2017-08-10 16:50:32 +0200
committerUlf Hermann <ulf.hermann@qt.io>2017-08-14 09:39:50 +0000
commite7c950eb11c393a2b999e2a175f71b72716b6168 (patch)
tree3b992360762907a2cd782683a4d4529eff378799 /src/plugins/qmlprofiler/qmlprofilerstatisticsview.cpp
parent0cbb78e464cd2b1dac93a179e22941d6bdec1dd7 (diff)
downloadqt-creator-e7c950eb11c393a2b999e2a175f71b72716b6168.tar.gz
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: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'src/plugins/qmlprofiler/qmlprofilerstatisticsview.cpp')
-rw-r--r--src/plugins/qmlprofiler/qmlprofilerstatisticsview.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/plugins/qmlprofiler/qmlprofilerstatisticsview.cpp b/src/plugins/qmlprofiler/qmlprofilerstatisticsview.cpp
index 428b98b2d2..b603def7ba 100644
--- a/src/plugins/qmlprofiler/qmlprofilerstatisticsview.cpp
+++ b/src/plugins/qmlprofiler/qmlprofilerstatisticsview.cpp
@@ -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]) {