20 SimpleProfiler::instance()->begin( __FILE__, __LINE__, __func__, 0 ); 23 SimpleProfiler::instance()->end(); 25 #define PROF_BEGIN_NAMED(name) \ 26 SimpleProfiler::instance()->begin( __FILE__, __LINE__, __func__, name ); 31 #define PROF_BEGIN_NAMED(name) 88 void begin(
const char* file,
int line,
const char*
function,
const char*
name );
const char * function_
The function/method name.
Definition: simpleprofiler.h:68
qint64 durationWithoutChilds() const
Definition: simpleprofiler.h:59
virtual ~SimpleProfiler()
destroy the stuff
Definition: simpleprofiler.cpp:39
qint64 duration_
The total duration.
Definition: simpleprofiler.h:72
SimpleProfiler()
Definition: simpleprofiler.cpp:33
const char * name_
The custom name.
Definition: simpleprofiler.h:69
QMap< QString, ProfilerItem * > statsMap_
The statistics.
Definition: simpleprofiler.h:96
static SimpleProfiler * instance()
This method returns the profile instance.
Definition: simpleprofiler.cpp:13
void incCallCount()
Definition: simpleprofiler.h:61
QStack< ProfileStackItem > stack_
The current items being processed.
Definition: simpleprofiler.h:97
const char * filename() const
Definition: simpleprofiler.h:52
int line_
The line.
Definition: simpleprofiler.h:67
Copyright 2011-2013 - Reliable Bits Software by Blommers IT.
Definition: commentcommand.cpp:22
const char * name() const
Definition: simpleprofiler.h:55
FILE / LINE / FUNCTION (or func )
Definition: simpleprofiler.h:40
const char * filename_
The filename.
Definition: simpleprofiler.h:66
void addChildDuration(qint64 duration)
Definition: simpleprofiler.h:63
void end()
ends profiling
Definition: simpleprofiler.cpp:65
qint64 duration() const
Definition: simpleprofiler.h:57
ProfilerItem * item
Definition: simpleprofiler.h:78
int callCount_
The total number of calls.
Definition: simpleprofiler.h:71
qint64 startTime
Definition: simpleprofiler.h:79
int line() const
Definition: simpleprofiler.h:53
qint64 childDuration() const
Definition: simpleprofiler.h:58
int callCount() const
Definition: simpleprofiler.h:56
void addDuration(qint64 duration)
Definition: simpleprofiler.h:62
The current stats items.
Definition: simpleprofiler.h:77
the class to 'record a singlel item
Definition: simpleprofiler.h:49
qint64 childDuration_
Duration of child-items (items called by this item)
Definition: simpleprofiler.h:73
void begin(const char *file, int line, const char *function, const char *name)
begin the profiling
Definition: simpleprofiler.cpp:48
void dumpResults()
This method dumps the results to the output.
Definition: simpleprofiler.cpp:85
ProfilerItem(const char *filename, int line, const char *function, const char *name)
the constructor for a profile stat issue
Definition: simpleprofiler.cpp:21