Public Member Functions

base::Profiling Class Reference

A profiling class that lets you save execution count and times for several tasks. More...

#include <libppbase/base/Profiling.h>

Inheritance diagram for base::Profiling:
base::Timer

List of all members.

Public Member Functions

template<class TO >
void dump (TO &out)
 dump contents to a stream
const std::map< String,
std::pair< unsigned,
u_longlong_t > > & 
getTasks () const
 Gets the profiled tasks.
void start ()
 Starts profiling of a task (called at start of task).
void stop (const char *name, unsigned count=1)
 Stops profiling of a task (called at end of task).

Detailed Description

A profiling class that lets you save execution count and times for several tasks.

Author:
Christoph Schwarz
Version:
$Id: Profiling.h 21 2010-09-05 04:18:17Z cschwarz1 $

Member Function Documentation

const std::map<String, std::pair<unsigned, u_longlong_t> >& base::Profiling::getTasks (  )  const

Gets the profiled tasks.

Returns:
the profiled tasks (name, (count, ticks))
void base::Profiling::stop ( const char *  name,
unsigned  count = 1 
)

Stops profiling of a task (called at end of task).

Parameters:
name the task name, may not be NULL
count number of tasks performed

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