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

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

#include "lldb/Utility/Timer.h"

Collaboration diagram for lldb_private::Timer:
Collaboration graph
[legend]

Classes

class  Category
 

Public Member Functions

 Timer (Category &category, const char *format,...) __attribute__((format(printf
 Default constructor. More...
 
 ~Timer ()
 Destructor. More...
 
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
 

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 56 of file Timer.h.

Constructor & Destructor Documentation

◆ Timer()

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

Default constructor.

Definition at line 52 of file Timer.cpp.

References g_display_depth, g_quiet, GetFileMutex(), GetTimerStackForCurrentThread(), and TIMER_INDENT_AMOUNT.

◆ ~Timer()

Timer::~Timer ( )

Member Function Documentation

◆ ChildDuration()

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

Definition at line 57 of file Timer.h.

References m_child_duration.

◆ Dump()

void lldb_private::Timer::Dump ( )

◆ DumpCategoryTimes()

void Timer::DumpCategoryTimes ( Stream s)
static

◆ ResetCategoryTimes()

void Timer::ResetCategoryTimes ( )
static

Definition at line 111 of file Timer.cpp.

References g_categories.

◆ SetDisplayDepth()

void Timer::SetDisplayDepth ( uint32_t  depth)
static

Definition at line 98 of file Timer.cpp.

References g_display_depth.

◆ SetQuiet()

void Timer::SetQuiet ( bool  value)
static

Definition at line 50 of file Timer.cpp.

References g_quiet.

Member Data Documentation

◆ g_display_depth

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

Definition at line 64 of file Timer.h.

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

◆ g_quiet

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

Definition at line 63 of file Timer.h.

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

◆ m_category

Category& lldb_private::Timer::m_category
protected

Definition at line 59 of file Timer.h.

Referenced by ~Timer().

◆ m_child_duration

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

Definition at line 61 of file Timer.h.

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

◆ m_total_start

TimePoint lldb_private::Timer::m_total_start
protected

Definition at line 60 of file Timer.h.

Referenced by ~Timer().


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