24#ifndef CS_MTA_METRICS_AGGREGATOR_H
25#define CS_MTA_METRICS_AGGREGATOR_H
97 void reset()
override;
151 int64_t time)
override;
Abstract class for time based metrics implementations.
Definition: time_based_metric_interface.h:30
Class that encodes how much time we waited for something.
Definition: time_based_metric.h:31
This abstract class is an interface for classes that contain replication applier data as counters and...
Definition: applier_metrics_interface.h:36
This class contains metrics related to event and transaction scheduling activities in the replica MTA...
Definition: applier_metrics.h:35
Metrics_breakpoint_state
State of the metrics breakpoint.
Definition: applier_metrics.h:179
@ before
Breakpoint set by receiver; applier is positioned before it.
@ after
Breakpoint set by receiver; applier is positioned after it.
@ unset
Breakpoint not set yet (nothing received).
Time_based_metric_interface & get_work_from_source_wait_metric() override
Returns time metrics for waits on work from the source.
Definition: applier_metrics.cc:136
Time_based_metric m_wait_for_transaction_dependency
Tracks the number and time waited for transaction dependencies.
Definition: applier_metrics.h:213
std::atomic_int64_t m_order_commit_waited_time
The stored total amount of time waited for commit order.
Definition: applier_metrics.h:234
Time_based_metric m_wait_for_work_from_source
Tracks the number and time waited for transactions to apply.
Definition: applier_metrics.h:203
std::atomic_int64_t m_order_commit_wait_count
The stored number of time waited for commit order.
Definition: applier_metrics.h:231
void inc_events_committed_count(int64_t delta) override
increment the number of events scheduled by a given amount.
Definition: applier_metrics.cc:101
void inc_transactions_received_size_sum(int64_t amount) override
increment the pending size of queued transactions.
Definition: applier_metrics.cc:93
Time_based_metric m_wait_due_to_worker_queue_full
Tracks the number and time waited for transaction dependencies.
Definition: applier_metrics.h:223
std::atomic_int64_t m_transactions_committed
Holds the counter of transactions committed.
Definition: applier_metrics.h:169
void check_metrics_breakpoint(const char *relay_log_filename) override
If we are before the metrics breakpoint, and the metrics breakpoint is equal to the given filename,...
Definition: applier_metrics.cc:124
Time_based_metric_interface & get_worker_queues_full_wait_metric() override
Returns time metrics for waits when the worker queues are full.
Definition: applier_metrics.cc:156
std::atomic_int64_t m_transactions_received_size_sum
Holds the executed event's size of transactions now ongoing.
Definition: applier_metrics.h:195
Time_based_metric m_wait_for_worker_available
Tracks the number and time waited for transactions to apply.
Definition: applier_metrics.h:208
int64_t get_transactions_received_count() const override
Gets the number of transactions pending.
Definition: applier_metrics.cc:81
Time_based_metric_interface & get_transaction_dependency_wait_metric() override
Returns time metrics for waits on transaction dependecies on workers.
Definition: applier_metrics.cc:146
int64_t get_events_committed_count() const override
Gets the number of events scheduled.
Definition: applier_metrics.cc:105
int64_t get_wait_time_on_commit_order() const override
Gets the stored summed time waited on commit order.
Definition: applier_metrics.cc:175
std::atomic_int64_t m_transactions_committed_size_sum
Holds the total size of transactions committed till now.
Definition: applier_metrics.h:192
std::atomic< Metrics_breakpoint_state > m_metrics_breakpoint_state
True if the receiver has initialized m_first_received_relay_log.
Definition: applier_metrics.h:188
int64_t get_last_applier_start_micros() const override
Gets the time point when the metric timer started.
Definition: applier_metrics.cc:61
int64_t get_transactions_committed_size_sum() const override
Gets the total sum of the size of committed transactions.
Definition: applier_metrics.cc:89
int64_t get_transactions_received_size_sum() const override
Gets the pending size sum of queued transactions.
Definition: applier_metrics.cc:97
void set_metrics_breakpoint(const char *relay_log_filename) override
Set the metrics breakpoint, if it has not already been set.
Definition: applier_metrics.cc:109
Time_based_metric_interface & get_workers_available_wait_metric() override
Returns time metrics for waits on available workers.
Definition: applier_metrics.cc:141
void inc_transactions_committed_size_sum(int64_t amount) override
increment the size of transactions committed.
Definition: applier_metrics.cc:85
int64_t get_total_execution_time() const override
Returns the total time the applier was running.
Definition: applier_metrics.cc:65
void inc_transactions_committed_count(int64_t amount) override
increment the number of transactions committed.
Definition: applier_metrics.cc:69
void reset() override
Resets the statistics to zero.
Definition: applier_metrics.cc:29
Time_based_metric_interface & get_time_to_read_from_relay_log_metric() override
Returns time metrics for relay log read wait times.
Definition: applier_metrics.cc:161
void inc_commit_order_wait_stored_metrics(int64_t count, int64_t time) override
Increments the stored values for the commit order metrics.
Definition: applier_metrics.cc:165
int64_t get_transactions_committed_count() const override
Gets the number of transactions committed.
Definition: applier_metrics.cc:73
Time_based_metric_interface & get_worker_queues_memory_exceeds_max_wait_metric() override
Returns time metrics for waits when a worker queue exceeds max memory.
Definition: applier_metrics.cc:151
std::atomic_int64_t m_transactions_received_count
Holds the counter of transactions currently pending.
Definition: applier_metrics.h:172
void start_applier_timer() override
Starts the timer when the applier metrics collection began.
Definition: applier_metrics.cc:50
std::string m_first_received_relay_log
The first (oldest) relay log that the receiver wrote to after metric collection was enabled.
Definition: applier_metrics.h:176
Time_based_metric m_sum_applier_execution_time
total applier execution time
Definition: applier_metrics.h:166
void inc_transactions_received_count(int64_t amount) override
increment the number of transactions pending.
Definition: applier_metrics.cc:77
std::atomic_int64_t m_events_committed_count
Holds the counter of events scheduled.
Definition: applier_metrics.h:198
void stop_applier_timer() override
Calculates the total time the applier ran.
Definition: applier_metrics.cc:57
Time_based_metric m_wait_due_to_worker_queues_memory_exceeds_max
Tracks the number and time waited for transaction dependencies.
Definition: applier_metrics.h:218
bool is_after_metrics_breakpoint() const override
Definition: applier_metrics.cc:119
int64_t get_number_of_waits_on_commit_order() const override
Gets the stored number of times we waited on committed order.
Definition: applier_metrics.cc:171
Time_based_metric m_time_to_read_from_relay_log
Tracks the number and time waited for transaction dependencies.
Definition: applier_metrics.h:228
std::atomic< int64_t > m_last_applier_start_micros
stats collection start timestamp
Definition: applier_metrics.h:163
static int count
Definition: myisam_ftdump.cc:45
Definition: applier_metrics.cc:27