MySQL 8.4.2
Source Code Documentation
aggregated_stats_buffer Struct Reference

Similar to System_status_var, implements atomic counters for status variables whose values are calculated by aggregating over all available sessions (THDs). More...

#include <aggregated_stats_buffer.h>

Public Member Functions

 aggregated_stats_buffer ()
 
void flush ()
 
void add_from (aggregated_stats_buffer &shard)
 
uint64_t get_counter (std::size_t offset)
 

Public Attributes

std::atomic_uint64_t com_other
 
std::atomic_uint64_t com_stmt_execute
 
std::atomic_uint64_t com_stmt_close
 
std::atomic_uint64_t com_stmt_fetch
 
std::atomic_uint64_t com_stmt_prepare
 
std::atomic_uint64_t com_stmt_reset
 
std::atomic_uint64_t com_stmt_reprepare
 
std::atomic_uint64_t com_stmt_send_long_data
 
std::atomic_uint64_t com_stat [(unsigned int) SQLCOM_END]
 
std::atomic_uint64_t table_open_cache_hits
 
std::atomic_uint64_t table_open_cache_misses
 
std::atomic_uint64_t table_open_cache_overflows
 
std::atomic_uint64_t created_tmp_disk_tables
 
std::atomic_uint64_t created_tmp_tables
 
std::atomic_uint64_t max_execution_time_exceeded
 
std::atomic_uint64_t max_execution_time_set
 
std::atomic_uint64_t max_execution_time_set_failed
 
std::atomic_uint64_t opened_tables
 
std::atomic_uint64_t opened_shares
 
std::atomic_uint64_t questions
 
std::atomic_uint64_t secondary_engine_execution_count
 
std::atomic_uint64_t select_full_join_count
 
std::atomic_uint64_t select_full_range_join_count
 
std::atomic_uint64_t select_range_count
 
std::atomic_uint64_t select_range_check_count
 
std::atomic_uint64_t select_scan_count
 
std::atomic_uint64_t long_query_count
 
std::atomic_uint64_t filesort_merge_passes
 
std::atomic_uint64_t filesort_range_count
 
std::atomic_uint64_t filesort_rows
 
std::atomic_uint64_t filesort_scan_count
 
std::atomic_uint64_t bytes_sent
 
std::atomic_uint64_t bytes_received
 
std::atomic_uint64_t ha_commit_count
 
std::atomic_uint64_t ha_delete_count
 
std::atomic_uint64_t ha_discover_count
 
std::atomic_uint64_t ha_external_lock_count
 
std::atomic_uint64_t ha_multi_range_read_init_count
 
std::atomic_uint64_t ha_prepare_count
 
std::atomic_uint64_t ha_read_first_count
 
std::atomic_uint64_t ha_read_key_count
 
std::atomic_uint64_t ha_read_last_count
 
std::atomic_uint64_t ha_read_next_count
 
std::atomic_uint64_t ha_read_prev_count
 
std::atomic_uint64_t ha_read_rnd_count
 
std::atomic_uint64_t ha_read_rnd_next_count
 
std::atomic_uint64_t ha_rollback_count
 
std::atomic_uint64_t ha_savepoint_count
 
std::atomic_uint64_t ha_savepoint_rollback_count
 
std::atomic_uint64_t ha_update_count
 
std::atomic_uint64_t ha_write_count
 

Detailed Description

Similar to System_status_var, implements atomic counters for status variables whose values are calculated by aggregating over all available sessions (THDs).

The single buffer object will store aggregated values for a number of THDs belonging to the same shard. All counters must use the same atomic data type, to simplify working with offsets.

This mechanism is used to maintain these values in real-time for the purpose of reporting telemetry metrics. Existing older mechanism to calculate the same data on-demand (for SHOW GLOBAL STATUS) was not modified.

Constructor & Destructor Documentation

◆ aggregated_stats_buffer()

aggregated_stats_buffer::aggregated_stats_buffer ( )

Member Function Documentation

◆ add_from()

void aggregated_stats_buffer::add_from ( aggregated_stats_buffer shard)

◆ flush()

void aggregated_stats_buffer::flush ( )

◆ get_counter()

uint64_t aggregated_stats_buffer::get_counter ( std::size_t  offset)

Member Data Documentation

◆ bytes_received

std::atomic_uint64_t aggregated_stats_buffer::bytes_received

◆ bytes_sent

std::atomic_uint64_t aggregated_stats_buffer::bytes_sent

◆ com_other

std::atomic_uint64_t aggregated_stats_buffer::com_other

◆ com_stat

std::atomic_uint64_t aggregated_stats_buffer::com_stat[(unsigned int) SQLCOM_END]

◆ com_stmt_close

std::atomic_uint64_t aggregated_stats_buffer::com_stmt_close

◆ com_stmt_execute

std::atomic_uint64_t aggregated_stats_buffer::com_stmt_execute

◆ com_stmt_fetch

std::atomic_uint64_t aggregated_stats_buffer::com_stmt_fetch

◆ com_stmt_prepare

std::atomic_uint64_t aggregated_stats_buffer::com_stmt_prepare

◆ com_stmt_reprepare

std::atomic_uint64_t aggregated_stats_buffer::com_stmt_reprepare

◆ com_stmt_reset

std::atomic_uint64_t aggregated_stats_buffer::com_stmt_reset

◆ com_stmt_send_long_data

std::atomic_uint64_t aggregated_stats_buffer::com_stmt_send_long_data

◆ created_tmp_disk_tables

std::atomic_uint64_t aggregated_stats_buffer::created_tmp_disk_tables

◆ created_tmp_tables

std::atomic_uint64_t aggregated_stats_buffer::created_tmp_tables

◆ filesort_merge_passes

std::atomic_uint64_t aggregated_stats_buffer::filesort_merge_passes

◆ filesort_range_count

std::atomic_uint64_t aggregated_stats_buffer::filesort_range_count

◆ filesort_rows

std::atomic_uint64_t aggregated_stats_buffer::filesort_rows

◆ filesort_scan_count

std::atomic_uint64_t aggregated_stats_buffer::filesort_scan_count

◆ ha_commit_count

std::atomic_uint64_t aggregated_stats_buffer::ha_commit_count

◆ ha_delete_count

std::atomic_uint64_t aggregated_stats_buffer::ha_delete_count

◆ ha_discover_count

std::atomic_uint64_t aggregated_stats_buffer::ha_discover_count

◆ ha_external_lock_count

std::atomic_uint64_t aggregated_stats_buffer::ha_external_lock_count

◆ ha_multi_range_read_init_count

std::atomic_uint64_t aggregated_stats_buffer::ha_multi_range_read_init_count

◆ ha_prepare_count

std::atomic_uint64_t aggregated_stats_buffer::ha_prepare_count

◆ ha_read_first_count

std::atomic_uint64_t aggregated_stats_buffer::ha_read_first_count

◆ ha_read_key_count

std::atomic_uint64_t aggregated_stats_buffer::ha_read_key_count

◆ ha_read_last_count

std::atomic_uint64_t aggregated_stats_buffer::ha_read_last_count

◆ ha_read_next_count

std::atomic_uint64_t aggregated_stats_buffer::ha_read_next_count

◆ ha_read_prev_count

std::atomic_uint64_t aggregated_stats_buffer::ha_read_prev_count

◆ ha_read_rnd_count

std::atomic_uint64_t aggregated_stats_buffer::ha_read_rnd_count

◆ ha_read_rnd_next_count

std::atomic_uint64_t aggregated_stats_buffer::ha_read_rnd_next_count

◆ ha_rollback_count

std::atomic_uint64_t aggregated_stats_buffer::ha_rollback_count

◆ ha_savepoint_count

std::atomic_uint64_t aggregated_stats_buffer::ha_savepoint_count

◆ ha_savepoint_rollback_count

std::atomic_uint64_t aggregated_stats_buffer::ha_savepoint_rollback_count

◆ ha_update_count

std::atomic_uint64_t aggregated_stats_buffer::ha_update_count

◆ ha_write_count

std::atomic_uint64_t aggregated_stats_buffer::ha_write_count

◆ long_query_count

std::atomic_uint64_t aggregated_stats_buffer::long_query_count

◆ max_execution_time_exceeded

std::atomic_uint64_t aggregated_stats_buffer::max_execution_time_exceeded

◆ max_execution_time_set

std::atomic_uint64_t aggregated_stats_buffer::max_execution_time_set

◆ max_execution_time_set_failed

std::atomic_uint64_t aggregated_stats_buffer::max_execution_time_set_failed

◆ opened_shares

std::atomic_uint64_t aggregated_stats_buffer::opened_shares

◆ opened_tables

std::atomic_uint64_t aggregated_stats_buffer::opened_tables

◆ questions

std::atomic_uint64_t aggregated_stats_buffer::questions

◆ secondary_engine_execution_count

std::atomic_uint64_t aggregated_stats_buffer::secondary_engine_execution_count

◆ select_full_join_count

std::atomic_uint64_t aggregated_stats_buffer::select_full_join_count

◆ select_full_range_join_count

std::atomic_uint64_t aggregated_stats_buffer::select_full_range_join_count

◆ select_range_check_count

std::atomic_uint64_t aggregated_stats_buffer::select_range_check_count

◆ select_range_count

std::atomic_uint64_t aggregated_stats_buffer::select_range_count

◆ select_scan_count

std::atomic_uint64_t aggregated_stats_buffer::select_scan_count

◆ table_open_cache_hits

std::atomic_uint64_t aggregated_stats_buffer::table_open_cache_hits

◆ table_open_cache_misses

std::atomic_uint64_t aggregated_stats_buffer::table_open_cache_misses

◆ table_open_cache_overflows

std::atomic_uint64_t aggregated_stats_buffer::table_open_cache_overflows

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