LLVM  6.0.0svn
Public Member Functions | Static Public Member Functions | List of all members
llvm::TimeRecord Class Reference

#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
 
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. More...
 

Static Public Member Functions

static TimeRecord getCurrentTime (bool Start=true)
 Get the current time and memory usage. More...
 

Detailed Description

Definition at line 26 of file Timer.h.

Constructor & Destructor Documentation

◆ TimeRecord()

llvm::TimeRecord::TimeRecord ( )
inline

Definition at line 32 of file Timer.h.

References getCurrentTime().

Member Function Documentation

◆ getCurrentTime()

TimeRecord TimeRecord::getCurrentTime ( bool  Start = true)
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 112 of file Timer.cpp.

References llvm::count(), getMemUsage(), llvm::sys::Process::GetTimeUsage(), and now().

Referenced by llvm::Timer::startTimer(), llvm::Timer::stopTimer(), and TimeRecord().

◆ getMemUsed()

ssize_t llvm::TimeRecord::getMemUsed ( ) const
inline

Definition at line 44 of file Timer.h.

Referenced by print().

◆ getProcessTime()

double llvm::TimeRecord::getProcessTime ( ) const
inline

Definition at line 40 of file Timer.h.

Referenced by print().

◆ getSystemTime()

double llvm::TimeRecord::getSystemTime ( ) const
inline

Definition at line 42 of file Timer.h.

Referenced by print(), and llvm::TimerGroup::printAll().

◆ getUserTime()

double llvm::TimeRecord::getUserTime ( ) const
inline

Definition at line 41 of file Timer.h.

Referenced by print(), and llvm::TimerGroup::printAll().

◆ getWallTime()

double llvm::TimeRecord::getWallTime ( ) const
inline

Definition at line 43 of file Timer.h.

Referenced by print(), and llvm::TimerGroup::printAll().

◆ operator+=()

void llvm::TimeRecord::operator+= ( const TimeRecord RHS)
inline

Definition at line 51 of file Timer.h.

◆ operator-=()

void llvm::TimeRecord::operator-= ( const TimeRecord RHS)
inline

Definition at line 57 of file Timer.h.

References print().

◆ operator<()

bool llvm::TimeRecord::operator< ( const TimeRecord T) const
inline

Definition at line 46 of file Timer.h.

◆ print()

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 157 of file Timer.cpp.

References llvm::StringMap< ValueTy, AllocatorTy >::begin(), E, llvm::StringMap< ValueTy, AllocatorTy >::end(), llvm::format(), getMemUsed(), getProcessTime(), getSystemTime(), getUserTime(), getWallTime(), I, llvm::Timer::init(), llvm::Timer::isInitialized(), printVal(), and T.

Referenced by operator-=(), and llvm::TimerGroup::setName().


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