LLDB mainline
Classes | Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Static Protected Attributes | Private Member Functions | List of all members
lldb_private::Timer Class Reference

A timer class that simplifies common timing metrics. More...

#include "lldb/Utility/Timer.h"

Classes

class  Category
 

Public Member Functions

 Timer (Category &category, const char *format,...) __attribute__((format(printf
 Default constructor.
 
 ~Timer ()
 Destructor.
 
void Dump ()
 

Static Public Member Functions

static void SetDisplayDepth (uint32_t depth)
 
static void SetQuiet (bool value)
 
static void DumpCategoryTimes (Stream &s)
 
static void ResetCategoryTimes ()
 

Protected Types

using TimePoint = std::chrono::steady_clock::time_point
 

Protected Member Functions

void ChildDuration (TimePoint::duration dur)
 

Protected Attributes

Categorym_category
 
TimePoint m_total_start
 
TimePoint::duration m_child_duration {0}
 

Static Protected Attributes

static std::atomic< bool > g_quiet
 
static std::atomic< unsigned > g_display_depth
 

Private Member Functions

 Timer (const Timer &)=delete
 
const Timeroperator= (const Timer &)=delete
 

Detailed Description

A timer class that simplifies common timing metrics.

Definition at line 23 of file Timer.h.

Member Typedef Documentation

◆ TimePoint

using lldb_private::Timer::TimePoint = std::chrono::steady_clock::time_point
protected

Definition at line 64 of file Timer.h.

Constructor & Destructor Documentation

◆ Timer() [1/2]

Timer::Timer ( Timer::Category category,
const char *  format,
  ... 
)

◆ ~Timer()

Timer::~Timer ( )

◆ Timer() [2/2]

lldb_private::Timer::Timer ( const Timer )
privatedelete

Member Function Documentation

◆ ChildDuration()

void lldb_private::Timer::ChildDuration ( TimePoint::duration  dur)
inlineprotected

Definition at line 65 of file Timer.h.

References m_child_duration.

◆ Dump()

void lldb_private::Timer::Dump ( )

◆ DumpCategoryTimes()

void Timer::DumpCategoryTimes ( Stream s)
static

◆ operator=()

const Timer & lldb_private::Timer::operator= ( const Timer )
privatedelete

◆ ResetCategoryTimes()

void Timer::ResetCategoryTimes ( )
static

Definition at line 130 of file Timer.cpp.

References g_categories.

Referenced by CommandObjectLogTimerReset::DoExecute().

◆ SetDisplayDepth()

void Timer::SetDisplayDepth ( uint32_t  depth)
static

◆ SetQuiet()

void Timer::SetQuiet ( bool  value)
static

Definition at line 58 of file Timer.cpp.

References g_quiet.

Referenced by CommandObjectLogTimerIncrement::DoExecute().

Member Data Documentation

◆ g_display_depth

std::atomic< unsigned > Timer::g_display_depth
staticprotected

Definition at line 72 of file Timer.h.

Referenced by SetDisplayDepth(), Timer(), and ~Timer().

◆ g_quiet

std::atomic< bool > Timer::g_quiet
staticprotected

Definition at line 71 of file Timer.h.

Referenced by SetQuiet(), Timer(), and ~Timer().

◆ m_category

Category& lldb_private::Timer::m_category
protected

Definition at line 67 of file Timer.h.

Referenced by Timer(), and ~Timer().

◆ m_child_duration

TimePoint::duration lldb_private::Timer::m_child_duration {0}
protected

Definition at line 69 of file Timer.h.

Referenced by ChildDuration(), and ~Timer().

◆ m_total_start

TimePoint lldb_private::Timer::m_total_start
protected

Definition at line 68 of file Timer.h.

Referenced by ~Timer().


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