svcore  1.9
Profiles Class Reference

Profiling classes. More...

#include <Profiler.h>

Collaboration diagram for Profiles:

Public Member Functions

 ~Profiles ()
 
void accumulate (const char *id, clock_t time, RealTime rt)
 
void dump () const
 

Static Public Member Functions

static ProfilesgetInstance ()
 

Protected Types

typedef std::pair< clock_t, RealTimeTimePair
 
typedef std::pair< int, TimePairProfilePair
 
typedef std::map< const char *, ProfilePairProfileMap
 
typedef std::map< const char *, TimePairLastCallMap
 
typedef std::map< const char *, TimePairWorstCallMap
 

Protected Member Functions

 Profiles ()
 

Protected Attributes

ProfileMap m_profiles
 
LastCallMap m_lastCalls
 
WorstCallMap m_worstCalls
 

Static Protected Attributes

static Profilesm_instance = 0
 

Detailed Description

Profiling classes.

The class holding all profiling data

This class is a singleton

Definition at line 53 of file Profiler.h.

Member Typedef Documentation

◆ TimePair

typedef std::pair<clock_t, RealTime> Profiles::TimePair
protected

Definition at line 65 of file Profiler.h.

◆ ProfilePair

typedef std::pair<int, TimePair> Profiles::ProfilePair
protected

Definition at line 66 of file Profiler.h.

◆ ProfileMap

typedef std::map<const char *, ProfilePair> Profiles::ProfileMap
protected

Definition at line 67 of file Profiler.h.

◆ LastCallMap

typedef std::map<const char *, TimePair> Profiles::LastCallMap
protected

Definition at line 68 of file Profiler.h.

◆ WorstCallMap

typedef std::map<const char *, TimePair> Profiles::WorstCallMap
protected

Definition at line 69 of file Profiler.h.

Constructor & Destructor Documentation

◆ ~Profiles()

Profiles::~Profiles ( )

Definition at line 45 of file Profiler.cpp.

References dump().

◆ Profiles()

Profiles::Profiles ( )
protected

Definition at line 41 of file Profiler.cpp.

Referenced by getInstance().

Member Function Documentation

◆ getInstance()

Profiles * Profiles::getInstance ( )
static

Definition at line 34 of file Profiler.cpp.

References m_instance, and Profiles().

Referenced by Profiler::end().

◆ accumulate()

void Profiles::accumulate ( const char *  id,
clock_t  time,
RealTime  rt 
)

Definition at line 50 of file Profiler.cpp.

References m_lastCalls, m_profiles, and m_worstCalls.

Referenced by Profiler::end().

◆ dump()

void Profiles::dump ( ) const

Definition at line 78 of file Profiler.cpp.

References m_profiles, and m_worstCalls.

Referenced by ~Profiles().

Member Data Documentation

◆ m_profiles

ProfileMap Profiles::m_profiles
protected

Definition at line 70 of file Profiler.h.

Referenced by accumulate(), and dump().

◆ m_lastCalls

LastCallMap Profiles::m_lastCalls
protected

Definition at line 71 of file Profiler.h.

Referenced by accumulate().

◆ m_worstCalls

WorstCallMap Profiles::m_worstCalls
protected

Definition at line 72 of file Profiler.h.

Referenced by accumulate(), and dump().

◆ m_instance

Profiles * Profiles::m_instance = 0
staticprotected

Definition at line 74 of file Profiler.h.

Referenced by getInstance().


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