Provides a method of recording run time profiles of operations, allowing easy recording of their overall run time.
More...
#include <qgsruntimeprofiler.h>
|
| QgsRuntimeProfiler () |
| Constructor to create a new runtime profiler. More...
|
|
| ~QgsRuntimeProfiler () override |
|
Q_DECL_DEPRECATED void | beginGroup (const QString &name) |
| Begin the group for the profiler. More...
|
|
QStringList | childGroups (const QString &parent=QString(), const QString &group="startup") const |
| Returns a list of all child groups with the specified parent. More...
|
|
void | clear (const QString &group="startup") |
| clear Clear all profile data. More...
|
|
int | columnCount (const QModelIndex &parent=QModelIndex()) const override |
|
QVariant | data (const QModelIndex &index, int role=Qt::DisplayRole) const override |
|
void | end (const QString &group="startup") |
| End the current profile event. More...
|
|
Q_DECL_DEPRECATED void | endGroup () |
| End the current active group. More...
|
|
void | groupAdded (const QString &group) |
| Emitted when a new group has started being profiled. More...
|
|
bool | groupIsActive (const QString &group) const |
| Returns true if the specified group is currently being logged, i.e. More...
|
|
QSet< QString > | groups () const |
| Returns the set of known groups. More...
|
|
QVariant | headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const override |
|
QModelIndex | index (int row, int column, const QModelIndex &parent=QModelIndex()) const override |
|
QModelIndex | parent (const QModelIndex &child) const override |
|
double | profileTime (const QString &name, const QString &group="startup") const |
| Returns the profile time for the specified name. More...
|
|
int | rowCount (const QModelIndex &parent=QModelIndex()) const override |
|
void | start (const QString &name, const QString &group="startup") |
| Start a profile event with the given name. More...
|
|
double | totalTime (const QString &group="startup") |
| The current total time collected in the profiler. More...
|
|
Provides a method of recording run time profiles of operations, allowing easy recording of their overall run time.
QgsRuntimeProfiler is not usually instantied manually, but rather accessed through QgsApplication::profiler().
This class is thread-safe only if accessed through QgsApplication::profiler(). If accessed in this way, operations can be profiled from non-main threads.
Definition at line 173 of file qgsruntimeprofiler.h.
◆ QgsRuntimeProfiler()
QgsRuntimeProfiler::QgsRuntimeProfiler |
( |
| ) |
|
◆ ~QgsRuntimeProfiler()
QgsRuntimeProfiler::~QgsRuntimeProfiler |
( |
| ) |
|
|
overridedefault |
◆ beginGroup()
void QgsRuntimeProfiler::beginGroup |
( |
const QString & |
name | ) |
|
Begin the group for the profiler.
Groups will append {GroupName}/ to the front of the profile tag set using start.
- Parameters
-
name | The name of the group. |
- Deprecated:
- use start() instead
Definition at line 179 of file qgsruntimeprofiler.cpp.
◆ childGroups()
QStringList QgsRuntimeProfiler::childGroups |
( |
const QString & |
parent = QString() , |
|
|
const QString & |
group = "startup" |
|
) |
| const |
Returns a list of all child groups with the specified parent.
- Since
- QGIS 3.14
Definition at line 189 of file qgsruntimeprofiler.cpp.
◆ clear()
void QgsRuntimeProfiler::clear |
( |
const QString & |
group = "startup" | ) |
|
◆ columnCount()
int QgsRuntimeProfiler::columnCount |
( |
const QModelIndex & |
parent = QModelIndex() | ) |
const |
|
override |
◆ data()
QVariant QgsRuntimeProfiler::data |
( |
const QModelIndex & |
index, |
|
|
int |
role = Qt::DisplayRole |
|
) |
| const |
|
override |
◆ end()
void QgsRuntimeProfiler::end |
( |
const QString & |
group = "startup" | ) |
|
◆ endGroup()
void QgsRuntimeProfiler::endGroup |
( |
| ) |
|
◆ groupAdded()
void QgsRuntimeProfiler::groupAdded |
( |
const QString & |
group | ) |
|
Emitted when a new group has started being profiled.
◆ groupIsActive()
bool QgsRuntimeProfiler::groupIsActive |
( |
const QString & |
group | ) |
const |
Returns true
if the specified group is currently being logged, i.e.
it has a entry which has started and not yet stopped.
- Since
- QGIS 3.14
Definition at line 294 of file qgsruntimeprofiler.cpp.
◆ groups()
QSet< QString > QgsRuntimeProfiler::groups |
( |
| ) |
const |
|
inline |
◆ headerData()
QVariant QgsRuntimeProfiler::headerData |
( |
int |
section, |
|
|
Qt::Orientation |
orientation, |
|
|
int |
role = Qt::DisplayRole |
|
) |
| const |
|
override |
◆ index()
QModelIndex QgsRuntimeProfiler::index |
( |
int |
row, |
|
|
int |
column, |
|
|
const QModelIndex & |
parent = QModelIndex() |
|
) |
| const |
|
override |
◆ parent()
QModelIndex QgsRuntimeProfiler::parent |
( |
const QModelIndex & |
child | ) |
const |
|
override |
◆ profileTime()
double QgsRuntimeProfiler::profileTime |
( |
const QString & |
name, |
|
|
const QString & |
group = "startup" |
|
) |
| const |
◆ rowCount()
int QgsRuntimeProfiler::rowCount |
( |
const QModelIndex & |
parent = QModelIndex() | ) |
const |
|
override |
◆ start()
void QgsRuntimeProfiler::start |
( |
const QString & |
name, |
|
|
const QString & |
group = "startup" |
|
) |
| |
Start a profile event with the given name.
The name of the profile event. Will have the name of the active group appended after ending.
Definition at line 206 of file qgsruntimeprofiler.cpp.
◆ totalTime()
double QgsRuntimeProfiler::totalTime |
( |
const QString & |
group = "startup" | ) |
|
The current total time collected in the profiler.
- Returns
- The current total time collected in the profiler.
Definition at line 286 of file qgsruntimeprofiler.cpp.
◆ translateGroupName()
QString QgsRuntimeProfiler::translateGroupName |
( |
const QString & |
group | ) |
|
|
static |
◆ QgsApplication
The documentation for this class was generated from the following files: