24#ifndef METRICS_HANDLER_INCLUDED
25#define METRICS_HANDLER_INCLUDED
199 const uint64_t end_timestamp);
211 const uint64_t begin_timestamp,
const uint64_t end_timestamp);
222 const uint64_t end_timestamp);
232 const uint64_t end_timestamp);
270 const uint64_t end_timestamp);
293 const uint64_t bytes,
294 const uint64_t sent_timestamp,
295 const uint64_t received_timestamp);
Class that represents the data that is exchanged within a group.
Definition: gcs_message.h:357
Definition: metrics_handler.h:40
uint64_t get_data_messages_sent_bytes_sum() const
Sum of bytes of messages that contain transaction data sent by this member.
Definition: metrics_handler.cc:74
Metrics_handler()=default
std::atomic< uint64_t > m_certification_garbage_collector_time_sum
Definition: metrics_handler.h:317
std::atomic< uint64_t > m_data_messages_sent_bytes_sum
Definition: metrics_handler.h:301
std::atomic< uint64_t > m_data_messages_sent_count
Definition: metrics_handler.h:298
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=...
Definition: metrics_handler.cc:300
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_consist...
Definition: metrics_handler.cc:102
std::atomic< uint64_t > m_data_messages_sent_roundtrip_time_sum
Definition: metrics_handler.h:304
uint64_t get_control_messages_sent_count() const
Number of control messages sent by this member.
Definition: metrics_handler.cc:62
enum_message_type
Definition: metrics_handler.h:42
uint64_t get_flow_control_throttle_time() const
Total time flow control delayed transactions.
Definition: metrics_handler.cc:133
uint64_t get_control_messages_sent_bytes_sum() const
Sum of bytes of control messages sent by this member.
Definition: metrics_handler.cc:70
uint64_t get_flow_control_throttle_last_throttle_timestamp() const
Flow control last timestamp of a transaction being throttled.
Definition: metrics_handler.cc:137
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...
Definition: metrics_handler.cc:289
std::atomic< uint64_t > m_flow_control_count
Definition: metrics_handler.h:319
uint64_t get_flow_control_throttle_count() const
Number of times flow control did run.
Definition: metrics_handler.cc:125
std::atomic< uint64_t > m_flow_control_throttle_time
Definition: metrics_handler.h:321
void reset()
Reset the metrics.
Definition: metrics_handler.cc:41
std::atomic< uint64_t > m_transactions_consistency_after_sync_time_sum
Definition: metrics_handler.h:314
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 befor...
Definition: metrics_handler.cc:91
uint64_t get_transactions_consistency_after_sync_count() const
Number of transactions executed with group_replication_consistency=AFTER or BEFORE_AND_AFTER.
Definition: metrics_handler.cc:107
uint64_t get_transactions_consistency_before_begin_count() const
Number of transactions executed with group_replication_consistency=BEFORE or BEFORE_AND_AFTER.
Definition: metrics_handler.cc:86
uint64_t get_certification_garbage_collector_time_sum() const
Sum of the time that garbage collection runs took.
Definition: metrics_handler.cc:121
std::atomic< uint64_t > m_flow_control_throttle_active
Definition: metrics_handler.h:320
void increment_flow_control_throttle()
Increment number of transactions currently throttled.
Definition: metrics_handler.cc:333
std::atomic< uint64_t > m_transactions_consistency_after_sync_count
Definition: metrics_handler.h:313
std::atomic< uint64_t > m_transactions_consistency_after_termination_time_sum
Definition: metrics_handler.h:310
uint64_t get_certification_garbage_collector_count() const
Number of times certification garbage collection did run.
Definition: metrics_handler.cc:117
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.
Definition: metrics_handler.cc:248
void add_garbage_collection_run(const uint64_t begin_timestamp, const uint64_t end_timestamp)
Account a certification garbage collection run.
Definition: metrics_handler.cc:311
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...
Definition: metrics_handler.cc:112
uint64_t get_flow_control_throttle_active() const
Flow control is active.
Definition: metrics_handler.cc:129
virtual ~Metrics_handler()=default
std::atomic< uint64_t > m_control_messages_sent_roundtrip_time_sum
Definition: metrics_handler.h:303
void add_message_sent(const Gcs_message &message)
Account message sent.
Definition: metrics_handler.cc:142
void decrement_flow_control_throttle()
Decrement number of transactions currently throttled.
Definition: metrics_handler.cc:337
std::atomic< uint64_t > m_transactions_consistency_before_begin_count
Definition: metrics_handler.h:306
std::atomic< uint64_t > m_transactions_consistency_after_termination_count
Definition: metrics_handler.h:309
std::atomic< uint64_t > m_control_messages_sent_count
Definition: metrics_handler.h:297
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 mem...
Definition: metrics_handler.cc:82
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.
Definition: metrics_handler.cc:78
static uint64_t get_current_time()
Return time in microseconds since the Epoch, 1970-01-01 00:00:00 +0000 (UTC)
Definition: metrics_handler.h:56
std::atomic< uint64_t > m_certification_garbage_collector_count
Definition: metrics_handler.h:316
std::atomic< uint64_t > m_transactions_consistency_before_begin_time_sum
Definition: metrics_handler.h:307
uint64_t get_transactions_consistency_after_termination_count() const
Number of transactions executed with group_replication_consistency=AFTER or BEFORE_AND_AFTER.
Definition: metrics_handler.cc:96
uint64_t get_data_messages_sent_count() const
Number of messages that contain transaction data sent by this member.
Definition: metrics_handler.cc:66
std::atomic< uint64_t > m_flow_control_throttle_last_throttle_timestamp
Definition: metrics_handler.h:323
void add_flow_control_throttle_stats(const uint64_t begin_timestamp, const uint64_t end_timestamp)
Update state of flow control.
Definition: metrics_handler.cc:322
std::atomic< uint64_t > m_control_messages_sent_bytes_sum
Definition: metrics_handler.h:300
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 execu...
Definition: metrics_handler.cc:278
Defines for getting and processing the current system type programmatically.
unsigned long long int my_micro_time()
Return time in microseconds.
Definition: my_systime.h:182
required string type
Definition: replication_group_member_actions.proto:34