MySQL 9.1.0
Source Code Documentation
cs::apply::instruments::Mta_worker_metrics Class Reference

This class contains metrics transaction execution in replica MTA workers. More...

#include <mta_worker_metrics.h>

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

Public Member Functions

void reset () override
 Resets the instruments on this instance. More...
 
Worker_metrics::Transaction_type_info get_transaction_type () const override
 Returns the type of the currently being processed transaction. More...
 
void set_transaction_type (Transaction_type_info type_info) override
 Set the type for the transaction being currently processed. More...
 
void set_transaction_ongoing_full_size (int64_t amount) override
 set the full size of the ongoing transaction. More...
 
int64_t get_transaction_ongoing_full_size () const override
 Gets the full size of the ongoing transaction. More...
 
void inc_transaction_ongoing_progress_size (int64_t amount) override
 increment the executed size of the ongoing transaction. More...
 
void reset_transaction_ongoing_progress_size () override
 Resets the the executed size of the ongoing transaction to 0. More...
 
int64_t get_transaction_ongoing_progress_size () const override
 Gets the executed size of the ongoing transaction. More...
 
void copy_stats_from (const Mta_worker_metrics &other)
 Copies stats from the given object into this one. More...
 
int64_t get_wait_time_on_commit_order () const override
 Gets the total time waited on commit order. More...
 
void inc_waited_time_on_commit_order (unsigned long amount) override
 Increments the number of times waited. More...
 
int64_t get_number_of_waits_on_commit_order () const override
 Get the number of time waiting on commit order. More...
 
void inc_number_of_waits_on_commit_order () override
 Increments the number of times waited. More...
 
- Public Member Functions inherited from cs::apply::instruments::Worker_metrics
virtual ~Worker_metrics ()=default
 

Private Attributes

std::atomic< Transaction_type_infom_transaction_type
 The type of the transactions being handled. More...
 
std::atomic_int64_t m_order_commit_wait_count {0}
 The number of time waited for commit order. More...
 
std::atomic_int64_t m_order_commit_waited_time {0}
 The total amount of time waited for commit order. More...
 
std::atomic_int64_t m_transaction_ongoing_full_size {0}
 Holds the total full size of the transaction now ongoing. More...
 
std::atomic_int64_t m_transaction_ongoing_progress_size {0}
 Holds the executed event's size of the transaction now ongoing. More...
 

Additional Inherited Members

- Public Types inherited from cs::apply::instruments::Worker_metrics
enum class  Transaction_type_info { UNKNOWN , DML , DDL }
 This class helps signaling a transactions as DDL or DML. More...
 

Detailed Description

This class contains metrics transaction execution in replica MTA workers.

Member Function Documentation

◆ copy_stats_from()

void cs::apply::instruments::Mta_worker_metrics::copy_stats_from ( const Mta_worker_metrics other)

Copies stats from the given object into this one.

Parameters
otherthe object to copy the stats from.

◆ get_number_of_waits_on_commit_order()

int64_t cs::apply::instruments::Mta_worker_metrics::get_number_of_waits_on_commit_order ( ) const
overridevirtual

Get the number of time waiting on commit order.

Returns
the counter of waits on commit order

Implements cs::apply::instruments::Worker_metrics.

◆ get_transaction_ongoing_full_size()

int64_t cs::apply::instruments::Mta_worker_metrics::get_transaction_ongoing_full_size ( ) const
overridevirtual

Gets the full size of the ongoing transaction.

Returns
the total size of the ongoing transaction

Implements cs::apply::instruments::Worker_metrics.

◆ get_transaction_ongoing_progress_size()

int64_t cs::apply::instruments::Mta_worker_metrics::get_transaction_ongoing_progress_size ( ) const
overridevirtual

Gets the executed size of the ongoing transaction.

Returns
the exectuted size of the ongoing transaction

Implements cs::apply::instruments::Worker_metrics.

◆ get_transaction_type()

Mta_worker_metrics::Transaction_type_info cs::apply::instruments::Mta_worker_metrics::get_transaction_type ( ) const
overridevirtual

Returns the type of the currently being processed transaction.

Returns
If the type is unknown, DML or DDL

Implements cs::apply::instruments::Worker_metrics.

◆ get_wait_time_on_commit_order()

int64_t cs::apply::instruments::Mta_worker_metrics::get_wait_time_on_commit_order ( ) const
overridevirtual

Gets the total time waited on commit order.

Returns
the sum of the time waited on commit

Implements cs::apply::instruments::Worker_metrics.

◆ inc_number_of_waits_on_commit_order()

void cs::apply::instruments::Mta_worker_metrics::inc_number_of_waits_on_commit_order ( )
overridevirtual

Increments the number of times waited.

Implements cs::apply::instruments::Worker_metrics.

◆ inc_transaction_ongoing_progress_size()

void cs::apply::instruments::Mta_worker_metrics::inc_transaction_ongoing_progress_size ( int64_t  amount)
overridevirtual

increment the executed size of the ongoing transaction.

Parameters
amountthe size amount to increment.

Implements cs::apply::instruments::Worker_metrics.

◆ inc_waited_time_on_commit_order()

void cs::apply::instruments::Mta_worker_metrics::inc_waited_time_on_commit_order ( unsigned long  amount)
overridevirtual

Increments the number of times waited.

Implements cs::apply::instruments::Worker_metrics.

◆ reset()

void cs::apply::instruments::Mta_worker_metrics::reset ( )
overridevirtual

Resets the instruments on this instance.

Implements cs::apply::instruments::Worker_metrics.

◆ reset_transaction_ongoing_progress_size()

void cs::apply::instruments::Mta_worker_metrics::reset_transaction_ongoing_progress_size ( )
overridevirtual

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

Implements cs::apply::instruments::Worker_metrics.

◆ set_transaction_ongoing_full_size()

void cs::apply::instruments::Mta_worker_metrics::set_transaction_ongoing_full_size ( int64_t  amount)
overridevirtual

set the full size of the ongoing transaction.

Parameters
amountnew size

Implements cs::apply::instruments::Worker_metrics.

◆ set_transaction_type()

void cs::apply::instruments::Mta_worker_metrics::set_transaction_type ( Mta_worker_metrics::Transaction_type_info  type_info)
overridevirtual

Set the type for the transaction being currently processed.

Parameters
type_infowhat is the type: UNKONWN, DML or DDL

Implements cs::apply::instruments::Worker_metrics.

Member Data Documentation

◆ m_order_commit_wait_count

std::atomic_int64_t cs::apply::instruments::Mta_worker_metrics::m_order_commit_wait_count {0}
private

The number of time waited for commit order.

◆ m_order_commit_waited_time

std::atomic_int64_t cs::apply::instruments::Mta_worker_metrics::m_order_commit_waited_time {0}
private

The total amount of time waited for commit order.

◆ m_transaction_ongoing_full_size

std::atomic_int64_t cs::apply::instruments::Mta_worker_metrics::m_transaction_ongoing_full_size {0}
private

Holds the total full size of the transaction now ongoing.

◆ m_transaction_ongoing_progress_size

std::atomic_int64_t cs::apply::instruments::Mta_worker_metrics::m_transaction_ongoing_progress_size {0}
private

Holds the executed event's size of the transaction now ongoing.

◆ m_transaction_type

std::atomic<Transaction_type_info> cs::apply::instruments::Mta_worker_metrics::m_transaction_type
private
Initial value:

The type of the transactions being handled.


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