edbee - Qt Editor Library
Classes | Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
edbee::SimpleProfiler Class Reference

FILE / LINE / FUNCTION (or func ) More...

#include <simpleprofiler.h>

+ Collaboration diagram for edbee::SimpleProfiler:

Classes

class  ProfilerItem
 the class to 'record a singlel item More...
 
struct  ProfileStackItem
 The current stats items. More...
 

Public Member Functions

 SimpleProfiler ()
 
virtual ~SimpleProfiler ()
 destroy the stuff More...
 
void begin (const char *file, int line, const char *function, const char *name)
 begin the profiling More...
 
void end ()
 ends profiling More...
 
void dumpResults ()
 This method dumps the results to the output. More...
 

Static Public Member Functions

static SimpleProfilerinstance ()
 This method returns the profile instance. More...
 

Protected Attributes

QMap< QString, ProfilerItem * > statsMap_
 The statistics. More...
 
QStack< ProfileStackItemstack_
 The current items being processed. More...
 

Detailed Description

FILE / LINE / FUNCTION (or func )

A simple profiler class that can be used to profile certain parts of the code. I've introduced this class as a poor-mans profiler. Because currently valgrand and other profilers don't seem to run smoothly on my mac. They crash ..

Constructor & Destructor Documentation

◆ SimpleProfiler()

edbee::SimpleProfiler::SimpleProfiler ( )

◆ ~SimpleProfiler()

edbee::SimpleProfiler::~SimpleProfiler ( )
virtual

destroy the stuff

Member Function Documentation

◆ begin()

void edbee::SimpleProfiler::begin ( const char *  file,
int  line,
const char *  function,
const char *  name 
)

begin the profiling

◆ dumpResults()

void edbee::SimpleProfiler::dumpResults ( )

This method dumps the results to the output.

◆ end()

void edbee::SimpleProfiler::end ( )

ends profiling

◆ instance()

SimpleProfiler * edbee::SimpleProfiler::instance ( )
static

This method returns the profile instance.

Member Data Documentation

◆ stack_

QStack<ProfileStackItem> edbee::SimpleProfiler::stack_
protected

The current items being processed.

◆ statsMap_

QMap<QString,ProfilerItem*> edbee::SimpleProfiler::statsMap_
protected

The statistics.


The documentation for this class was generated from the following files: