Common: Remove section measurement from profiler (#1731)

This has been entirely superseded by MicroProfile. The rest of the code
can go when a simpler frametime/FPS meter is added to the GUI.
This commit is contained in:
Yuri Kunde Schlesner 2016-04-29 00:07:10 -07:00
parent 90501f20e6
commit e3a8292495
13 changed files with 8 additions and 306 deletions

View file

@ -9,6 +9,7 @@
#include "citra_qt/debugger/profiler.h"
#include "citra_qt/util/util.h"
#include "common/common_types.h"
#include "common/microprofile.h"
#include "common/profiler_reporting.h"
@ -36,21 +37,9 @@ static QVariant GetDataForColumn(int col, const AggregatedDuration& duration)
}
}
static const TimingCategoryInfo* GetCategoryInfo(int id)
{
const auto& categories = GetProfilingManager().GetTimingCategoriesInfo();
if ((size_t)id >= categories.size()) {
return nullptr;
} else {
return &categories[id];
}
}
ProfilerModel::ProfilerModel(QObject* parent) : QAbstractItemModel(parent)
{
updateProfilingInfo();
const auto& categories = GetProfilingManager().GetTimingCategoriesInfo();
results.time_per_category.resize(categories.size());
}
QVariant ProfilerModel::headerData(int section, Qt::Orientation orientation, int role) const
@ -87,7 +76,7 @@ int ProfilerModel::rowCount(const QModelIndex& parent) const
if (parent.isValid()) {
return 0;
} else {
return static_cast<int>(results.time_per_category.size() + 2);
return 2;
}
}
@ -106,17 +95,6 @@ QVariant ProfilerModel::data(const QModelIndex& index, int role) const
} else {
return GetDataForColumn(index.column(), results.interframe_time);
}
} else {
if (index.column() == 0) {
const TimingCategoryInfo* info = GetCategoryInfo(index.row() - 2);
return info != nullptr ? QString(info->name) : QVariant();
} else {
if (index.row() - 2 < (int)results.time_per_category.size()) {
return GetDataForColumn(index.column(), results.time_per_category[index.row() - 2]);
} else {
return QVariant();
}
}
}
}