MySQL 8.4.0
Source Code Documentation
Tracer Class Reference

traces the timestamps of events in a stderr log. More...

#include <tracer.h>

Classes

class  Event
 

Public Types

using clock_type = std::chrono::steady_clock
 

Public Member Functions

 Tracer ()=default
 
 Tracer (bool enabled)
 
void trace (Event e)
 
 operator bool () const
 

Static Public Member Functions

static std::string direction (Event::Direction direction)
 
static std::string stage (Event::Stage st)
 

Private Attributes

bool enabled_ {false}
 
clock_type::time_point start_ {}
 
clock_type::time_point last_ {}
 

Detailed Description

traces the timestamps of events in a stderr log.

If enabled, the tracer outputs:

  • duration since Tracer was created
  • duration since last Event
  • direction (from|to client|server)
  • the event

to stderr.

Member Typedef Documentation

◆ clock_type

using Tracer::clock_type = std::chrono::steady_clock

Constructor & Destructor Documentation

◆ Tracer() [1/2]

Tracer::Tracer ( )
default

◆ Tracer() [2/2]

Tracer::Tracer ( bool  enabled)
inlineexplicit

Member Function Documentation

◆ direction()

static std::string Tracer::direction ( Event::Direction  direction)
inlinestatic

◆ operator bool()

Tracer::operator bool ( ) const
inlineexplicit

◆ stage()

static std::string Tracer::stage ( Event::Stage  st)
inlinestatic

◆ trace()

void Tracer::trace ( Event  e)
inline

Member Data Documentation

◆ enabled_

bool Tracer::enabled_ {false}
private

◆ last_

clock_type::time_point Tracer::last_ {}
private

◆ start_

clock_type::time_point Tracer::start_ {}
private

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