46 static std::vector<double> _start_times;
55 static std::map<std::string, double> _timer_splits;
62 Timer &operator=(
const Timer &) {
return *
this; }
89 static Timer instance;
103 void reduceTimer(MPI_Comm comm);
void printSplits()
Prints the times and messages for each split to the console.
Definition: Timer.cpp:96
double getSplit(const char *msg)
Returns the time associated with a particular split.
Definition: Timer.cpp:79
double getTime()
Returns the time elapsed from startTimer() to stopTimer().
Definition: Timer.cpp:68
Math constants and comparision tolerances.
void clearSplits()
Clears all times split messages from the Timer.
Definition: Timer.cpp:136
void startTimer()
Starts the Timer.
Definition: Timer.cpp:12
void stopTimer()
Stops the Timer.
Definition: Timer.cpp:26
Timer()
Constructor sets the current split elapsed time to zero.
Definition: Timer.h:74
virtual ~Timer()
Destructor.
Definition: Timer.h:82
void recordSplit(const char *msg)
Records a message corresponding to a time for the current split.
Definition: Timer.cpp:52
static Timer * Get()
Returns a static instance of the Timer class.
Definition: Timer.h:88
The Timer class is for timing and profiling regions of code.
Definition: Timer.h:40
Utility functions for writing log messages to the screen.
void clearSplit(const char *msg)
Clears the time split for this message and deletes the message's entry in the Timer's splits log...
Definition: Timer.cpp:122
void processMemUsage(double &vm_usage, double &resident_set)
Read memory usage file (on a HPC installation), and process it to make it more readable. Used for profiling.
Definition: Timer.cpp:148