Tracing: CtfVisualizer: Add percentage of total time to statistics

Adds a column for the percentage of the time of an event to the total
measurement time in percent.

Change-Id: Ic3298b4ef6f34cb893edd987e645c7cfb67458b5
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
This commit is contained in:
Tim Henning
2019-10-17 17:08:08 +02:00
parent 1673e692c5
commit 8d91258cfa
3 changed files with 24 additions and 0 deletions

View File

@@ -49,6 +49,7 @@ public:
Title = 0,
Count,
TotalDuration,
RelativeDuration,
MinDuration,
AvgDuration,
MaxDuration,
@@ -67,6 +68,7 @@ public:
void beginLoading();
void addEvent(const QString &title, qint64 durationInNs);
void setMeasurementDuration(qint64 timeInNs);
void endLoading();
private:
@@ -77,6 +79,7 @@ private:
QVariant headerData(int section, Qt::Orientation orientation, int role) const override;
QHash<QString, EventData> m_data;
qint64 m_measurementDurationInNs = 0;
};