5#include "application.h"
7#include "dispatchtype.h"
12#include <QtCore/QStringList>
17 : d_ptr(new StatsPrivate)
20 d->engineRequest = request;
33 stat.
begin = std::chrono::steady_clock::now();
34 d->actions.push_back(stat);
40 for (
auto &stat : d->actions) {
41 if (stat.action == action) {
42 stat.end = std::chrono::steady_clock::now();
53 if (d->actions.size() == 0) {
58 for (
const auto &stat : d->actions) {
59 const std::chrono::duration<double> duration = stat.
end - stat.begin;
63 ret = Utils::buildTable(table, {QStringLiteral(
"Action"), QStringLiteral(
"Time")});
virtual void profileEnd(const QString &action)
virtual QByteArray report()
virtual void profileStart(const QString &action)
Stats(EngineRequest *request)
The Cutelyst namespace holds all public Cutelyst API.
void append(QList::parameter_type value)
QString::iterator begin()
QString number(double n, char format, int precision)