Add generic FlameGraphView QML component

This allows us to reduce code duplication, but we first have to put
timeline and flame graph into the same library, so that we can use the
TimelineThere in FlameGraphView.

Change-Id: I72b27ffb1fc5aa6baf6a23d85e5ca6c610896b8c
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
Ulf Hermann
2018-05-02 18:51:57 +02:00
parent bd91d938c4
commit 22e523e504
7 changed files with 404 additions and 314 deletions

View File

@@ -208,7 +208,6 @@ QVariant FlameGraphModel::lookup(const FlameGraphData &stats, int role) const
case DurationRole: return stats.duration;
case CallCountRole: return stats.calls;
case TimePerCallRole: return stats.duration / stats.calls;
case TimeInPercentRole: return stats.duration * 100 / m_stackBottom.duration;
case AllocationsRole: return stats.allocations;
case MemoryRole: return stats.memory;
default: break;
@@ -321,7 +320,6 @@ QHash<int, QByteArray> FlameGraphModel::roleNames() const
{ColumnRole, "column"},
{NoteRole, "note"},
{TimePerCallRole, "timePerCall"},
{TimeInPercentRole, "timeInPercent"},
{RangeTypeRole, "rangeType"},
{LocationRole, "location" },
{AllocationsRole, "allocations" },