LLVM 17.0.0git
|
#include "llvm/Support/Timer.h"
Public Member Functions | |
TimeRecord () | |
double | getProcessTime () const |
double | getUserTime () const |
double | getSystemTime () const |
double | getWallTime () const |
ssize_t | getMemUsed () const |
uint64_t | getInstructionsExecuted () const |
bool | operator< (const TimeRecord &T) const |
void | operator+= (const TimeRecord &RHS) |
void | operator-= (const TimeRecord &RHS) |
void | print (const TimeRecord &Total, raw_ostream &OS) const |
Print the current time record to OS , with a breakdown showing contributions to the Total time record. | |
Static Public Member Functions | |
static TimeRecord | getCurrentTime (bool Start=true) |
Get the current time and memory usage. | |
|
static |
Get the current time and memory usage.
If Start is true we get the memory usage before the time, otherwise we get time before memory usage. This matters if the time to get the memory usage is significant and shouldn't be counted as part of a duration.
Definition at line 168 of file Timer.cpp.
References getCurInstructionsExecuted(), getMemUsage(), llvm::sys::Process::GetTimeUsage(), and now().
Referenced by llvm::Timer::startTimer(), and llvm::Timer::stopTimer().
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
void TimeRecord::print | ( | const TimeRecord & | Total, |
raw_ostream & | OS | ||
) | const |
Print the current time record to OS
, with a breakdown showing contributions to the Total
time record.
Definition at line 217 of file Timer.cpp.
References llvm::format(), getInstructionsExecuted(), getMemUsed(), getProcessTime(), getSystemTime(), getUserTime(), getWallTime(), printVal(), and llvm::Total.