MySQL 9.1.0
Source Code Documentation
cs::apply::instruments::Worker_metrics Class Referenceabstract

Abstract class for classes that contain metrics related to transaction execution in applier workers. More...

#include <worker_metrics.h>

Inheritance diagram for cs::apply::instruments::Worker_metrics:
[legend]

Public Types

enum class  Transaction_type_info { UNKNOWN , DML , DDL }
 This class helps signaling a transactions as DDL or DML. More...
 

Public Member Functions

virtual ~Worker_metrics ()=default
 
virtual void reset ()=0
 Resets the instruments on this instance. More...
 
virtual Transaction_type_info get_transaction_type () const =0
 Returns the type of the currently being processed transaction. More...
 
virtual void set_transaction_type (Transaction_type_info type_info)=0
 Set the type for the transaction being currently processed. More...
 
virtual void set_transaction_ongoing_full_size (int64_t amount)=0
 set the full size of the ongoing transaction. More...
 
virtual int64_t get_transaction_ongoing_full_size () const =0
 Gets the full size of the ongoing transaction. More...
 
virtual void inc_transaction_ongoing_progress_size (int64_t amount)=0
 increment the executed size of the ongoing transaction. More...
 
virtual void reset_transaction_ongoing_progress_size ()=0
 Resets the the executed size of the ongoing transaction to 0. More...
 
virtual int64_t get_transaction_ongoing_progress_size () const =0
 Gets the executed size of the ongoing transaction. More...
 
virtual int64_t get_wait_time_on_commit_order () const =0
 Gets the total time waited on commit order. More...
 
virtual void inc_waited_time_on_commit_order (unsigned long amount)=0
 Increments the number of times waited. More...
 
virtual int64_t get_number_of_waits_on_commit_order () const =0
 Get the number of time waiting on commit order. More...
 
virtual void inc_number_of_waits_on_commit_order ()=0
 Increments the number of times waited. More...
 

Detailed Description

Abstract class for classes that contain metrics related to transaction execution in applier workers.

Member Enumeration Documentation

◆ Transaction_type_info

This class helps signaling a transactions as DDL or DML.

Enumerator
UNKNOWN 
DML 
DDL 

Constructor & Destructor Documentation

◆ ~Worker_metrics()

virtual cs::apply::instruments::Worker_metrics::~Worker_metrics ( )
virtualdefault

Member Function Documentation

◆ get_number_of_waits_on_commit_order()

virtual int64_t cs::apply::instruments::Worker_metrics::get_number_of_waits_on_commit_order ( ) const
pure virtual

Get the number of time waiting on commit order.

Returns
the counter of waits on commit order

Implemented in cs::apply::instruments::Dummy_worker_metrics, and cs::apply::instruments::Mta_worker_metrics.

◆ get_transaction_ongoing_full_size()

virtual int64_t cs::apply::instruments::Worker_metrics::get_transaction_ongoing_full_size ( ) const
pure virtual

Gets the full size of the ongoing transaction.

Returns
the total size of the ongoing transaction

Implemented in cs::apply::instruments::Dummy_worker_metrics, and cs::apply::instruments::Mta_worker_metrics.

◆ get_transaction_ongoing_progress_size()

virtual int64_t cs::apply::instruments::Worker_metrics::get_transaction_ongoing_progress_size ( ) const
pure virtual

Gets the executed size of the ongoing transaction.

Returns
the exectuted size of the ongoing transaction

Implemented in cs::apply::instruments::Dummy_worker_metrics, and cs::apply::instruments::Mta_worker_metrics.

◆ get_transaction_type()

virtual Transaction_type_info cs::apply::instruments::Worker_metrics::get_transaction_type ( ) const
pure virtual

Returns the type of the currently being processed transaction.

Returns
If the type is unknown, DML or DDL

Implemented in cs::apply::instruments::Dummy_worker_metrics, and cs::apply::instruments::Mta_worker_metrics.

◆ get_wait_time_on_commit_order()

virtual int64_t cs::apply::instruments::Worker_metrics::get_wait_time_on_commit_order ( ) const
pure virtual

Gets the total time waited on commit order.

Returns
the sum of the time waited on commit

Implemented in cs::apply::instruments::Dummy_worker_metrics, and cs::apply::instruments::Mta_worker_metrics.

◆ inc_number_of_waits_on_commit_order()

virtual void cs::apply::instruments::Worker_metrics::inc_number_of_waits_on_commit_order ( )
pure virtual

Increments the number of times waited.

Implemented in cs::apply::instruments::Dummy_worker_metrics, and cs::apply::instruments::Mta_worker_metrics.

◆ inc_transaction_ongoing_progress_size()

virtual void cs::apply::instruments::Worker_metrics::inc_transaction_ongoing_progress_size ( int64_t  amount)
pure virtual

increment the executed size of the ongoing transaction.

Parameters
amountthe size amount to increment.

Implemented in cs::apply::instruments::Dummy_worker_metrics, and cs::apply::instruments::Mta_worker_metrics.

◆ inc_waited_time_on_commit_order()

virtual void cs::apply::instruments::Worker_metrics::inc_waited_time_on_commit_order ( unsigned long  amount)
pure virtual

Increments the number of times waited.

Implemented in cs::apply::instruments::Dummy_worker_metrics, and cs::apply::instruments::Mta_worker_metrics.

◆ reset()

virtual void cs::apply::instruments::Worker_metrics::reset ( )
pure virtual

Resets the instruments on this instance.

Implemented in cs::apply::instruments::Dummy_worker_metrics, and cs::apply::instruments::Mta_worker_metrics.

◆ reset_transaction_ongoing_progress_size()

virtual void cs::apply::instruments::Worker_metrics::reset_transaction_ongoing_progress_size ( )
pure virtual

Resets the the executed size of the ongoing transaction to 0.

Implemented in cs::apply::instruments::Dummy_worker_metrics, and cs::apply::instruments::Mta_worker_metrics.

◆ set_transaction_ongoing_full_size()

virtual void cs::apply::instruments::Worker_metrics::set_transaction_ongoing_full_size ( int64_t  amount)
pure virtual

set the full size of the ongoing transaction.

Parameters
amountnew size

Implemented in cs::apply::instruments::Dummy_worker_metrics, and cs::apply::instruments::Mta_worker_metrics.

◆ set_transaction_type()

virtual void cs::apply::instruments::Worker_metrics::set_transaction_type ( Transaction_type_info  type_info)
pure virtual

Set the type for the transaction being currently processed.

Parameters
type_infowhat is the type: UNKONWN, DML or DDL

Implemented in cs::apply::instruments::Dummy_worker_metrics, and cs::apply::instruments::Mta_worker_metrics.


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