diff options
| author | Tony Wasserka <neobrainx@gmail.com> | 2015-03-07 15:30:40 +0100 |
|---|---|---|
| committer | Tony Wasserka <neobrainx@gmail.com> | 2015-03-07 15:30:40 +0100 |
| commit | 93e32bce72905ac1bd0a5e75066fda5e6b7bf250 (patch) | |
| tree | 4530e9d8db22955416543899b6c0e59abf8b9732 /src/citra_qt/debugger/profiler.h | |
| parent | 53ba65db436eb9c25ac71e17bfb8685d599b1681 (diff) | |
| parent | dc8a3f8bc842df1b3eeeb5a283556ac644ab3183 (diff) | |
Merge pull request #538 from yuriks/perf-stat
Add profiling infrastructure and widget
Diffstat (limited to 'src/citra_qt/debugger/profiler.h')
| -rw-r--r-- | src/citra_qt/debugger/profiler.h | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/src/citra_qt/debugger/profiler.h b/src/citra_qt/debugger/profiler.h new file mode 100644 index 000000000..a6d87aa0f --- /dev/null +++ b/src/citra_qt/debugger/profiler.h @@ -0,0 +1,50 @@ +// Copyright 2015 Citra Emulator Project +// Licensed under GPLv2 or any later version +// Refer to the license.txt file included. + +#pragma once + +#include <QAbstractItemModel> +#include <QDockWidget> +#include <QTimer> +#include "ui_profiler.h" + +#include "common/profiler_reporting.h" + +class ProfilerModel : public QAbstractItemModel +{ + Q_OBJECT + +public: + ProfilerModel(QObject* parent); + + QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const; + QModelIndex index(int row, int column, const QModelIndex& parent = QModelIndex()) const override; + QModelIndex parent(const QModelIndex& child) const override; + int columnCount(const QModelIndex& parent = QModelIndex()) const override; + int rowCount(const QModelIndex& parent = QModelIndex()) const override; + QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const override; + +public slots: + void updateProfilingInfo(); + +private: + Common::Profiling::AggregatedFrameResult results; +}; + +class ProfilerWidget : public QDockWidget +{ + Q_OBJECT + +public: + ProfilerWidget(QWidget* parent = 0); + +private slots: + void setProfilingInfoUpdateEnabled(bool enable); + +private: + Ui::Profiler ui; + ProfilerModel* model; + + QTimer update_timer; +}; |
