Menge
Modular Pedestrian Simulation Framework for Research and Development
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Namespaces | Macros | Functions
Profiler.h File Reference

Functionality for timing and profiling the program. More...

#include <string>
#include <ctime>
#include "include/macros.h"

Go to the source code of this file.

Classes

class  Menge::Vis::Timer
 Basic timer. More...
 
class  Menge::Vis::LapTimer
 Lap timer. A timer which supports "laps" i.e., single calls which measure from the last "tick" to this tick. More...
 
class  Menge::Vis::SampleTimer
 A timer which uses a cache of values to only update its values every N calls to lap/elapsed. Useful for displaying frame rate. More...
 

Namespaces

 Menge
 The core namespace. All elements of Menge are contained in this namespace.
 

Functions

size_t Menge::addTimer (const std::string &displayString)
 Creates a lap timer which uses the given label for display. More...
 
void Menge::startTimer (size_t index)
 Starts the timer with the given identifier. More...
 
void Menge::stopTimer (size_t index)
 Stops the timer with the given identifier. More...
 
void Menge::lapTimer (size_t index)
 Lap the ith timer. More...
 
float Menge::averageTime (size_t index)
 Reports the average time of the ith timer. More...
 
void Menge::printAverages ()
 Prints the average times for all timers, displayed with the accompanying messages and set units.
 
void Menge::setUnits (float scale, const std::string &unitString)
 Sets the internal units of the profiler. More...
 

Detailed Description

Functionality for timing and profiling the program.