MySQL 8.4.2
Source Code Documentation
|
#include <metrics_handler.h>
Public Types | |
enum class | enum_message_type { CONTROL , DATA } |
Public Member Functions | |
Metrics_handler ()=default | |
virtual | ~Metrics_handler ()=default |
void | reset () |
Reset the metrics. More... | |
uint64_t | get_control_messages_sent_count () const |
Number of control messages sent by this member. More... | |
uint64_t | get_data_messages_sent_count () const |
Number of messages that contain transaction data sent by this member. More... | |
uint64_t | get_control_messages_sent_bytes_sum () const |
Sum of bytes of control messages sent by this member. More... | |
uint64_t | get_data_messages_sent_bytes_sum () const |
Sum of bytes of messages that contain transaction data sent by this member. More... | |
uint64_t | get_control_messages_sent_roundtrip_time_sum () const |
Sum of the roundtrip time in micro-seconds of control messages sent by this member. More... | |
uint64_t | get_data_messages_sent_roundtrip_time_sum () const |
Sum of the roundtrip time in micro-seconds of messages that contain transaction data sent by this member. More... | |
uint64_t | get_transactions_consistency_before_begin_count () const |
Number of transactions executed with group_replication_consistency=BEFORE or BEFORE_AND_AFTER. More... | |
uint64_t | get_transactions_consistency_before_begin_time_sum () const |
Sum of the time that the member waited until its group_replication_applier channel was consumed before execute the transaction with group_replication_consistency=BEFORE or BEFORE_AND_AFTER. More... | |
uint64_t | get_transactions_consistency_after_termination_count () const |
Number of transactions executed with group_replication_consistency=AFTER or BEFORE_AND_AFTER. More... | |
uint64_t | get_transactions_consistency_after_termination_time_sum () const |
Sum of the time spent between the delivery of the transaction executed with group_replication_consistency= AFTER or BEFORE_AND_AFTER, and the acknowledge of the other group members that the transaction is prepared. More... | |
uint64_t | get_transactions_consistency_after_sync_count () const |
Number of transactions executed with group_replication_consistency=AFTER or BEFORE_AND_AFTER. More... | |
uint64_t | get_transactions_consistency_after_sync_time_sum () const |
Sum of the time that transactions on secondaries waited to start, while waiting for transactions from the primary with group_replication_consistency=AFTER or BEFORE_AND_AFTER to be committed. More... | |
uint64_t | get_certification_garbage_collector_count () const |
Number of times certification garbage collection did run. More... | |
uint64_t | get_certification_garbage_collector_time_sum () const |
Sum of the time that garbage collection runs took. More... | |
void | add_message_sent (const Gcs_message &message) |
Account message sent. More... | |
void | add_transaction_consistency_before_begin (const uint64_t begin_timestamp, const uint64_t end_timestamp) |
Account transaction that waited until its group_replication_applier channel was consumed before execute the transaction with group_replication_consistency=BEFORE or BEFORE_AND_AFTER. More... | |
void | add_transaction_consistency_after_termination (const uint64_t begin_timestamp, const uint64_t end_timestamp) |
Account transaction executed with group_replication_consistency=AFTER or BEFORE_AND_AFTER that waited for the acknowledge of the other group members that the transaction is prepared. More... | |
void | add_transaction_consistency_after_sync (const uint64_t begin_timestamp, const uint64_t end_timestamp) |
Account transaction that waited for transactions from the primary with group_replication_consistency=AFTER or BEFORE_AND_AFTER to be committed. More... | |
void | add_garbage_collection_run (const uint64_t begin_timestamp, const uint64_t end_timestamp) |
Account a certification garbage collection run. More... | |
Static Public Member Functions | |
static uint64_t | get_current_time () |
Return time in microseconds since the Epoch, 1970-01-01 00:00:00 +0000 (UTC) More... | |
Private Member Functions | |
void | add_message_sent_internal (const enum_message_type type, const uint64_t bytes, const uint64_t sent_timestamp, const uint64_t received_timestamp) |
Account message sent. More... | |
Private Attributes | |
std::atomic< uint64_t > | m_control_messages_sent_count {0} |
std::atomic< uint64_t > | m_data_messages_sent_count {0} |
std::atomic< uint64_t > | m_control_messages_sent_bytes_sum {0} |
std::atomic< uint64_t > | m_data_messages_sent_bytes_sum {0} |
std::atomic< uint64_t > | m_control_messages_sent_roundtrip_time_sum {0} |
std::atomic< uint64_t > | m_data_messages_sent_roundtrip_time_sum {0} |
std::atomic< uint64_t > | m_transactions_consistency_before_begin_count {0} |
std::atomic< uint64_t > | m_transactions_consistency_before_begin_time_sum {0} |
std::atomic< uint64_t > | m_transactions_consistency_after_termination_count {0} |
std::atomic< uint64_t > | m_transactions_consistency_after_termination_time_sum |
std::atomic< uint64_t > | m_transactions_consistency_after_sync_count {0} |
std::atomic< uint64_t > | m_transactions_consistency_after_sync_time_sum {0} |
std::atomic< uint64_t > | m_certification_garbage_collector_count {0} |
std::atomic< uint64_t > | m_certification_garbage_collector_time_sum {0} |
|
strong |
|
default |
|
virtualdefault |
void Metrics_handler::add_garbage_collection_run | ( | const uint64_t | begin_timestamp, |
const uint64_t | end_timestamp | ||
) |
Account a certification garbage collection run.
begin_timestamp | time on which the operation began. |
end_timestamp | time on which the operation ended. |
void Metrics_handler::add_message_sent | ( | const Gcs_message & | message | ) |
Account message sent.
message | the message to be accounted. |
|
private |
Account message sent.
type | message type. |
bytes | message length. |
sent_timestamp | time on which the message was sent. |
received_timestamp | time on which the message was received. |
void Metrics_handler::add_transaction_consistency_after_sync | ( | const uint64_t | begin_timestamp, |
const uint64_t | end_timestamp | ||
) |
Account transaction that waited for transactions from the primary with group_replication_consistency=AFTER or BEFORE_AND_AFTER to be committed.
begin_timestamp | time on which the wait began. |
end_timestamp | time on which the wait ended. |
void Metrics_handler::add_transaction_consistency_after_termination | ( | const uint64_t | begin_timestamp, |
const uint64_t | end_timestamp | ||
) |
Account transaction executed with group_replication_consistency=AFTER or BEFORE_AND_AFTER that waited for the acknowledge of the other group members that the transaction is prepared.
begin_timestamp | time on which the wait began. |
end_timestamp | time on which the wait ended. |
void Metrics_handler::add_transaction_consistency_before_begin | ( | const uint64_t | begin_timestamp, |
const uint64_t | end_timestamp | ||
) |
Account transaction that waited until its group_replication_applier
channel was consumed before execute the transaction with group_replication_consistency=BEFORE or BEFORE_AND_AFTER.
begin_timestamp | time on which the wait began. |
end_timestamp | time on which the wait ended. |
uint64_t Metrics_handler::get_certification_garbage_collector_count | ( | ) | const |
Number of times certification garbage collection did run.
uint64_t Metrics_handler::get_certification_garbage_collector_time_sum | ( | ) | const |
Sum of the time that garbage collection runs took.
uint64_t Metrics_handler::get_control_messages_sent_bytes_sum | ( | ) | const |
Sum of bytes of control messages sent by this member.
The size is the over the wire size.
uint64_t Metrics_handler::get_control_messages_sent_count | ( | ) | const |
Number of control messages sent by this member.
uint64_t Metrics_handler::get_control_messages_sent_roundtrip_time_sum | ( | ) | const |
Sum of the roundtrip time in micro-seconds of control messages sent by this member.
The time is measured between the send and the delivery of the message on the sender member.
|
inlinestatic |
Return time in microseconds since the Epoch, 1970-01-01 00:00:00 +0000 (UTC)
uint64_t Metrics_handler::get_data_messages_sent_bytes_sum | ( | ) | const |
Sum of bytes of messages that contain transaction data sent by this member.
The size is the over the wire size.
uint64_t Metrics_handler::get_data_messages_sent_count | ( | ) | const |
Number of messages that contain transaction data sent by this member.
uint64_t Metrics_handler::get_data_messages_sent_roundtrip_time_sum | ( | ) | const |
Sum of the roundtrip time in micro-seconds of messages that contain transaction data sent by this member.
The time is measured between the send and the delivery of the message on the sender member.
uint64_t Metrics_handler::get_transactions_consistency_after_sync_count | ( | ) | const |
Number of transactions executed with group_replication_consistency=AFTER or BEFORE_AND_AFTER.
uint64_t Metrics_handler::get_transactions_consistency_after_sync_time_sum | ( | ) | const |
Sum of the time that transactions on secondaries waited to start, while waiting for transactions from the primary with group_replication_consistency=AFTER or BEFORE_AND_AFTER to be committed.
uint64_t Metrics_handler::get_transactions_consistency_after_termination_count | ( | ) | const |
Number of transactions executed with group_replication_consistency=AFTER or BEFORE_AND_AFTER.
uint64_t Metrics_handler::get_transactions_consistency_after_termination_time_sum | ( | ) | const |
Sum of the time spent between the delivery of the transaction executed with group_replication_consistency= AFTER or BEFORE_AND_AFTER, and the acknowledge of the other group members that the transaction is prepared.
uint64_t Metrics_handler::get_transactions_consistency_before_begin_count | ( | ) | const |
Number of transactions executed with group_replication_consistency=BEFORE or BEFORE_AND_AFTER.
uint64_t Metrics_handler::get_transactions_consistency_before_begin_time_sum | ( | ) | const |
Sum of the time that the member waited until its group_replication_applier
channel was consumed before execute the transaction with group_replication_consistency=BEFORE or BEFORE_AND_AFTER.
void Metrics_handler::reset | ( | ) |
Reset the metrics.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |