return data.timeStamp;
} else if (index.column() == 1) {
return data.leaked;
- } else {
+ } else if (index.column() == 2) {
return data.allocations;
+ } else {
+ return data.allocated;
}
}
int ChartModel::columnCount(const QModelIndex& /*parent*/) const
{
- return 3;
+ return 4;
}
int ChartModel::rowCount(const QModelIndex& parent) const
m_ui->loadingProgress->setMinimum(0);
m_ui->loadingProgress->setMaximum(0);
- auto memoryConsumptionProxy = new ChartProxy(i18n("Memory Consumption"), 1, this);
- memoryConsumptionProxy->setSourceModel(m_chartModel);
- m_ui->memoryConsumptionTab->setModel(memoryConsumptionProxy);
+ auto leakedProxy = new ChartProxy(i18n("Memory Leaked"), 1, this);
+ leakedProxy->setSourceModel(m_chartModel);
+ m_ui->leakedTab->setModel(leakedProxy);
auto allocationsProxy = new ChartProxy(i18n("Memory Allocations"), 2, this);
allocationsProxy->setSourceModel(m_chartModel);
m_ui->allocationsTab->setModel(allocationsProxy);
+ auto allocatedProxy = new ChartProxy(i18n("Memory Allocated"), 3, this);
+ allocatedProxy->setSourceModel(m_chartModel);
+ m_ui->allocatedTab->setModel(allocatedProxy);
+
connect(m_parser, &Parser::bottomUpDataAvailable,
m_bottomUpModel, &BottomUpModel::resetData);
connect(m_parser, &Parser::chartDataAvailable,
<zorder>widget</zorder>
<zorder>results</zorder>
</widget>
- <widget class="ChartWidget" name="memoryConsumptionTab">
+ <widget class="ChartWidget" name="leakedTab">
<attribute name="title">
- <string>Memory Consumption</string>
+ <string>Leaked</string>
</attribute>
</widget>
<widget class="ChartWidget" name="allocationsTab">
<string>Allocations</string>
</attribute>
</widget>
+ <widget class="ChartWidget" name="allocatedTab">
+ <attribute name="title">
+ <string>Allocated</string>
+ </attribute>
+ </widget>
</widget>
</item>
</layout>
void handleTimeStamp(size_t /*newStamp*/, size_t oldStamp)
{
- chartData.push_back({oldStamp, timestampData.leaked, totalAllocations});
+ chartData.push_back({oldStamp, timestampData.leaked, totalAllocations, totalAllocated});
timestampData = {};
}