7
#include "util/cmdlineargs.h"
12
explicit Trace(const QString& tag, bool stdout=true, bool time=false)
20
qDebug() << "START [" << m_tag << "]";
22
Stat::track(m_tag + "_enter", Stat::TRACE_START, Stat::COUNT, 0);
26
int elapsed = m_time ? m_timer.elapsed() : 0;
29
qDebug() << "END [" << m_tag << "]"
30
<< QString("elapsed: %1ms").arg(elapsed);
32
qDebug() << "END [" << m_tag << "]";
36
Stat::track(m_tag + "_exit", Stat::TRACE_FINISH, Stat::COUNT, 0);
41
Stat::COUNT | Stat::AVERAGE | Stat::SAMPLE_VARIANCE | Stat::MAX | Stat::MIN,
48
const bool m_stdout, m_time;
53
class DebugTrace : public Trace {
55
DebugTrace(const QString& tag, bool time=true)
56
: Trace(tag, CmdlineArgs::Instance().getDeveloper(), time) {
58
virtual ~DebugTrace() {