MySQL 9.2.0
Source Code Documentation
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts
Time_based_metric_stub Class Reference

Class that intends to be a dummy end point for time metrics. More...

#include <time_based_metric_stub.h>

Inheritance diagram for Time_based_metric_stub:
[legend]

Public Member Functions

void reset () override
 Resets the counter and summed time to 0. More...
 
int64_t get_time () const override
 Returns the time waited across all executions of the start/stop methods. More...
 
void increment_counter () override
 Increments the waiting counter. More...
 
int64_t get_count () const override
 Returns the number of time we waited on give spot. More...
 
- Public Member Functions inherited from Time_based_metric_interface
virtual ~Time_based_metric_interface ()=default
 
auto time_scope ()
 Start the timer, and return an object that will stop the timer when it is deleted. More...
 

Protected Member Functions

void start_timer () override
 Starts counting time we are waiting on something. More...
 
void stop_timer () override
 Stops the timer for the wait. More...
 

Detailed Description

Class that intends to be a dummy end point for time metrics.

Member Function Documentation

◆ get_count()

int64_t Time_based_metric_stub::get_count ( ) const
overridevirtual

Returns the number of time we waited on give spot.

Returns
the number of times waited

Implements Time_based_metric_interface.

◆ get_time()

int64_t Time_based_metric_stub::get_time ( ) const
overridevirtual

Returns the time waited across all executions of the start/stop methods.

Returns
The total time waited, in nanoseconds.

Implements Time_based_metric_interface.

◆ increment_counter()

void Time_based_metric_stub::increment_counter ( )
overridevirtual

Increments the waiting counter.

Implements Time_based_metric_interface.

◆ reset()

void Time_based_metric_stub::reset ( )
overridevirtual

Resets the counter and summed time to 0.

Implements Time_based_metric_interface.

◆ start_timer()

void Time_based_metric_stub::start_timer ( )
overrideprotectedvirtual

Starts counting time we are waiting on something.

Implements Time_based_metric_interface.

◆ stop_timer()

void Time_based_metric_stub::stop_timer ( )
overrideprotectedvirtual

Stops the timer for the wait.

Requires start_timer to be called first

Implements Time_based_metric_interface.


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