#include <resource_manager_stats_collector.h>
◆ gr_rm_thread_state
| Enumerator |
|---|
| IDLE | |
| RUNNING | |
| STOPPING | |
◆ Resource_manager_stats_collector() [1/3]
| gr_resource_manager::Resource_manager_stats_collector::Resource_manager_stats_collector |
( |
| ) |
|
◆ ~Resource_manager_stats_collector()
| gr_resource_manager::Resource_manager_stats_collector::~Resource_manager_stats_collector |
( |
| ) |
|
◆ Resource_manager_stats_collector() [2/3]
◆ Resource_manager_stats_collector() [3/3]
◆ convert_microseconds_to_timestamp_string()
| std::string gr_resource_manager::Resource_manager_stats_collector::convert_microseconds_to_timestamp_string |
( |
uint64_t |
microseconds_since_epoch | ) |
|
|
static |
Converts a time point represented by micro-seconds elapsed since the Epoch to the string format 'YYYY-MM-DD hh:mm:ss.ffffff'.
- Parameters
-
| [in] | microseconds_since_epoch | time point represented by micro-seconds elapsed since the Epoch |
- Returns
- a string with the format 'YYYY-MM-DD hh:mm:ss.ffffff'
◆ fetch_channel_lag()
| int gr_resource_manager::Resource_manager_stats_collector::fetch_channel_lag |
( |
| ) |
|
|
private |
◆ fetch_memory_used()
| int gr_resource_manager::Resource_manager_stats_collector::fetch_memory_used |
( |
| ) |
|
|
private |
Wrappers to call API and do error handling.
◆ get_applier_eviction_timestamp()
| std::string gr_resource_manager::Resource_manager_stats_collector::get_applier_eviction_timestamp |
( |
| ) |
|
Timestamp of last eviction caused by applier lag.
◆ get_applier_hit_number_of_times()
| uint gr_resource_manager::Resource_manager_stats_collector::get_applier_hit_number_of_times |
( |
| ) |
|
|
inline |
Returns number of times applier lag was seen.
- Return values
-
| counter | of applier lag seen |
◆ get_applier_lag()
| uint gr_resource_manager::Resource_manager_stats_collector::get_applier_lag |
( |
| ) |
|
Return applier lag.
- Return values
-
◆ get_lag_query_last_error_timestamp()
| std::string gr_resource_manager::Resource_manager_stats_collector::get_lag_query_last_error_timestamp |
( |
| ) |
|
Timestamp of last channel lag query failure.
◆ get_memory_eviction_timestamp()
| std::string gr_resource_manager::Resource_manager_stats_collector::get_memory_eviction_timestamp |
( |
| ) |
|
Timestamp of last eviction caused by low memory.
◆ get_memory_hit_number_of_times()
| uint gr_resource_manager::Resource_manager_stats_collector::get_memory_hit_number_of_times |
( |
| ) |
|
|
inline |
Returns number of times low memory was observed.
- Return values
-
| counter | of low memory seen |
◆ get_memory_last_error_timestamp()
| std::string gr_resource_manager::Resource_manager_stats_collector::get_memory_last_error_timestamp |
( |
| ) |
|
Timestamp of last memory status failure.
◆ get_percentage_used_memory()
| uint gr_resource_manager::Resource_manager_stats_collector::get_percentage_used_memory |
( |
| ) |
|
Return used memory.
- Return values
-
◆ get_recovery_eviction_timestamp()
| std::string gr_resource_manager::Resource_manager_stats_collector::get_recovery_eviction_timestamp |
( |
| ) |
|
Timestamp of last eviction caused by recovery lag.
◆ get_recovery_hit_number_of_times()
| uint gr_resource_manager::Resource_manager_stats_collector::get_recovery_hit_number_of_times |
( |
| ) |
|
|
inline |
Returns number of times recovery lag was seen.
- Return values
-
| counter | of recovery lag seen |
◆ get_recovery_lag()
| uint gr_resource_manager::Resource_manager_stats_collector::get_recovery_lag |
( |
| ) |
|
Return recovery lag.
- Return values
-
◆ get_time_now_microseconds()
| uint64_t gr_resource_manager::Resource_manager_stats_collector::get_time_now_microseconds |
( |
| ) |
|
|
static |
Returns the current time represented by micro-seconds elapsed since the Epoch.
- Returns
- the current time represented by micro-seconds elapsed since the Epoch.
◆ get_time_now_seconds()
| uint64_t gr_resource_manager::Resource_manager_stats_collector::get_time_now_seconds |
( |
| ) |
|
|
static |
Returns the current time represented by seconds elapsed since the Epoch.
- Returns
- the current time represented by seconds elapsed since the Epoch.
◆ is_group_in_single_primary_mode_and_im_a_secondary()
| bool gr_resource_manager::Resource_manager_stats_collector::is_group_in_single_primary_mode_and_im_a_secondary |
( |
| ) |
const |
Checks if group is in single primary mode and secondary.
◆ is_group_replication_running()
| bool gr_resource_manager::Resource_manager_stats_collector::is_group_replication_running |
( |
| ) |
const |
Checks if group_replication is running.
◆ is_time_diff_greater_than()
| bool gr_resource_manager::Resource_manager_stats_collector::is_time_diff_greater_than |
( |
uint64_t |
timepoint, |
|
|
uint64_t |
now, |
|
|
uint64_t |
diff = 300 |
|
) |
| |
|
static |
Check if the time difference between timepoint and now is greater than diff.
Parameters must be of the same unit: seconds, microseconds...
- Parameters
-
| [in] | timepoint | timepoint in time |
| [in] | now | a later timepoint in time |
| [in] | diff | the difference to compare |
- Returns
- true time difference between
timepoint and now is greater than diff false otherwise
◆ join()
| int gr_resource_manager::Resource_manager_stats_collector::join |
( |
my_thread_handle * |
thread, |
|
|
void ** |
value_ptr |
|
) |
| |
|
staticprivate |
◆ joinable()
| bool gr_resource_manager::Resource_manager_stats_collector::joinable |
( |
const my_thread_handle & |
thread | ) |
|
|
staticprivate |
◆ leave_group()
| eject_status gr_resource_manager::Resource_manager_stats_collector::leave_group |
( |
| ) |
|
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ process()
| void gr_resource_manager::Resource_manager_stats_collector::process |
( |
| ) |
|
|
private |
◆ run_process()
| void gr_resource_manager::Resource_manager_stats_collector::run_process |
( |
| ) |
|
◆ start_thread()
| int gr_resource_manager::Resource_manager_stats_collector::start_thread |
( |
| ) |
|
◆ stop_thread()
| void gr_resource_manager::Resource_manager_stats_collector::stop_thread |
( |
| ) |
|
◆ m_applier_continuous_lag
| uint gr_resource_manager::Resource_manager_stats_collector::m_applier_continuous_lag {0} |
|
private |
Number of times applier channel lag was hit continuously.
◆ m_applier_eviction_timestamp
| std::atomic<uint64_t> gr_resource_manager::Resource_manager_stats_collector::m_applier_eviction_timestamp {0} |
|
private |
Last timestamp member left the group due to applier lag.
◆ m_applier_hit_number_of_times
| std::atomic<uint> gr_resource_manager::Resource_manager_stats_collector::m_applier_hit_number_of_times {0} |
|
private |
Number of times applier channel lag exceeded the limit.
◆ m_applier_lag_last_fetched
| std::atomic<uint> gr_resource_manager::Resource_manager_stats_collector::m_applier_lag_last_fetched {0} |
|
private |
Below information is needed by status variables.
Applier channel lag fetched from SQL Query.
◆ m_channel_lag_monitoring_error_timestamp
| std::atomic<uint64_t> gr_resource_manager::Resource_manager_stats_collector::m_channel_lag_monitoring_error_timestamp {0} |
|
private |
Timestamp of last channel lag query failure.
◆ m_command_info
| PSI_mutex_info gr_resource_manager::Resource_manager_stats_collector::m_command_info |
|
private |
Initial value:
const std::string m_instr_name
Definition: resource_manager_stats_collector.h:243
PSI_mutex_key m_command_key
Definition: resource_manager_stats_collector.h:263
#define PSI_DOCUMENT_ME
Definition: component_common.h:29
#define PSI_FLAG_SINGLETON
Singleton flag.
Definition: component_common.h:35
#define PSI_VOLATILITY_PROVISIONING
Definition: psi_bits.h:155
◆ m_command_key
| PSI_mutex_key gr_resource_manager::Resource_manager_stats_collector::m_command_key {0} |
|
private |
◆ m_command_lock
| mysql_mutex_t gr_resource_manager::Resource_manager_stats_collector::m_command_lock |
|
private |
Synchronize start, stop and update.
◆ m_cond_info
| PSI_cond_info gr_resource_manager::Resource_manager_stats_collector::m_cond_info |
|
private |
Initial value:
PSI_cond_key m_cond_key
Definition: resource_manager_stats_collector.h:269
◆ m_cond_key
| PSI_cond_key gr_resource_manager::Resource_manager_stats_collector::m_cond_key {0} |
|
private |
◆ m_description
| const std::string gr_resource_manager::Resource_manager_stats_collector::m_description |
|
private |
◆ m_instr_name
| const std::string gr_resource_manager::Resource_manager_stats_collector::m_instr_name |
|
private |
◆ m_memory_continuous_excess_usage
| uint gr_resource_manager::Resource_manager_stats_collector::m_memory_continuous_excess_usage {0} |
|
private |
Number of times memory consumption cross the limit continuously.
◆ m_memory_eviction_timestamp
| std::atomic<uint64_t> gr_resource_manager::Resource_manager_stats_collector::m_memory_eviction_timestamp {0} |
|
private |
Last timestamp member left the group due to memory excessive consumption.
◆ m_memory_hit_number_of_times
| std::atomic<uint> gr_resource_manager::Resource_manager_stats_collector::m_memory_hit_number_of_times {0} |
|
private |
Number of times memory comsuption exceeded the limit.
◆ m_memory_info
◆ m_memory_monitoring_error_timestamp
| std::atomic<uint64_t> gr_resource_manager::Resource_manager_stats_collector::m_memory_monitoring_error_timestamp {0} |
|
private |
Timestamp of last memory information failure.
◆ m_name
| const std::string gr_resource_manager::Resource_manager_stats_collector::m_name |
|
private |
◆ m_not_removed_applier_threshold_hit_n_members_ts_s
| uint64_t gr_resource_manager::Resource_manager_stats_collector::m_not_removed_applier_threshold_hit_n_members_ts_s {0} |
|
private |
◆ m_not_removed_applier_threshold_hit_quarantime_ts_s
| uint64_t gr_resource_manager::Resource_manager_stats_collector::m_not_removed_applier_threshold_hit_quarantime_ts_s {0} |
|
private |
Below variables are needed to reduce the frequency of logging.
◆ m_not_removed_memory_threshold_hit_n_members_ts_s
| uint64_t gr_resource_manager::Resource_manager_stats_collector::m_not_removed_memory_threshold_hit_n_members_ts_s {0} |
|
private |
◆ m_not_removed_memory_threshold_hit_quarantime_ts_s
| uint64_t gr_resource_manager::Resource_manager_stats_collector::m_not_removed_memory_threshold_hit_quarantime_ts_s {0} |
|
private |
◆ m_not_removed_recovery_threshold_hit_n_members_ts_s
| uint64_t gr_resource_manager::Resource_manager_stats_collector::m_not_removed_recovery_threshold_hit_n_members_ts_s {0} |
|
private |
◆ m_not_removed_recovery_threshold_hit_quarantime_ts_s
| uint64_t gr_resource_manager::Resource_manager_stats_collector::m_not_removed_recovery_threshold_hit_quarantime_ts_s {0} |
|
private |
◆ m_os_name
| const std::string gr_resource_manager::Resource_manager_stats_collector::m_os_name |
|
private |
◆ m_percentage_used_memory_last_fetched
| std::atomic<uint> gr_resource_manager::Resource_manager_stats_collector::m_percentage_used_memory_last_fetched {0} |
|
private |
Used memory in percentage fetched from system.
◆ m_recovery_continuous_lag
| uint gr_resource_manager::Resource_manager_stats_collector::m_recovery_continuous_lag {0} |
|
private |
Number of times recovery channel lag was hit continuously.
◆ m_recovery_eviction_timestamp
| std::atomic<uint64_t> gr_resource_manager::Resource_manager_stats_collector::m_recovery_eviction_timestamp {0} |
|
private |
Last timestamp member left the group due to recovery lag.
◆ m_recovery_hit_number_of_times
| std::atomic<uint> gr_resource_manager::Resource_manager_stats_collector::m_recovery_hit_number_of_times {0} |
|
private |
Number of times recovery channel lag exceeded the limit.
◆ m_recovery_lag_last_fetched
| std::atomic<uint> gr_resource_manager::Resource_manager_stats_collector::m_recovery_lag_last_fetched {0} |
|
private |
Recovery channel lag fetched from SQL Query.
◆ m_seconds_since_member_join
| unsigned int gr_resource_manager::Resource_manager_stats_collector::m_seconds_since_member_join {0} |
|
private |
Time difference in seconds between last time this member joined and now.
◆ m_thread
| my_thread_handle gr_resource_manager::Resource_manager_stats_collector::m_thread |
|
private |
◆ m_thread_info
| PSI_thread_info gr_resource_manager::Resource_manager_stats_collector::m_thread_info |
|
private |
Initial value:{
PSI_thread_key m_thread_key
Definition: resource_manager_stats_collector.h:252
const std::string m_description
Definition: resource_manager_stats_collector.h:245
const std::string m_os_name
Definition: resource_manager_stats_collector.h:244
#define PSI_FLAG_THREAD_SYSTEM
System thread flag.
Definition: psi_bits.h:124
◆ m_thread_key
| PSI_thread_key gr_resource_manager::Resource_manager_stats_collector::m_thread_key {0} |
|
private |
◆ m_thread_state
◆ m_wait
| mysql_cond_t gr_resource_manager::Resource_manager_stats_collector::m_wait |
|
private |
◆ s_max_continuous_lag_counter
| constexpr uint gr_resource_manager::Resource_manager_stats_collector::s_max_continuous_lag_counter {10} |
|
staticconstexprprivate |
Continuous lag tolerance limit.
◆ s_sample_rate
| constexpr uint gr_resource_manager::Resource_manager_stats_collector::s_sample_rate {5} |
|
staticconstexprprivate |
frequency of sample collection, in seconds
The documentation for this class was generated from the following files: