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"

Collaboration diagram for lldb_private::Timer:
Collaboration graph


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

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

Definition at line 59 of file Timer.h.

Constructor & Destructor Documentation

◆ Timer() [1/2]

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

Default constructor.

Definition at line 55 of file Timer.cpp.

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

◆ ~Timer()

Timer::~Timer ( )

◆ Timer() [2/2]

lldb_private::Timer::Timer ( const Timer )

Member Function Documentation

◆ ChildDuration()

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

Definition at line 60 of file Timer.h.

References m_child_duration.

◆ Dump()

void lldb_private::Timer::Dump ( )

◆ DumpCategoryTimes()

void Timer::DumpCategoryTimes ( Stream s)

◆ operator=()

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

◆ ResetCategoryTimes()

void Timer::ResetCategoryTimes ( )

Definition at line 122 of file Timer.cpp.

References g_categories.

◆ SetDisplayDepth()

void Timer::SetDisplayDepth ( uint32_t  depth)

Definition at line 103 of file Timer.cpp.

References g_display_depth.

◆ SetQuiet()

void Timer::SetQuiet ( bool  value)

Definition at line 53 of file Timer.cpp.

References g_quiet.

Member Data Documentation

◆ g_display_depth

std::atomic< unsigned > Timer::g_display_depth

Definition at line 67 of file Timer.h.

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

◆ g_quiet

std::atomic< bool > Timer::g_quiet

Definition at line 66 of file Timer.h.

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

◆ m_category

Category& lldb_private::Timer::m_category

Definition at line 62 of file Timer.h.

Referenced by ~Timer().

◆ m_child_duration

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

Definition at line 64 of file Timer.h.

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

◆ m_total_start

TimePoint lldb_private::Timer::m_total_start

Definition at line 63 of file Timer.h.

Referenced by ~Timer().

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