MySQL 8.4.3
Source Code Documentation
|
To facilitate calculating values of status variables aggregated per all THDs in real-time, each THD will update its stats into a matching buffer shard. More...
#include <aggregated_stats.h>
Public Member Functions | |
aggregated_stats_buffer & | get_shard (my_thread_id thread_id) |
void | flush () |
void | get_total (aggregated_stats_buffer &result) |
uint64_t | get_single_total (size_t offset) |
Static Public Attributes | |
constexpr static size_t | STAT_SHARD_COUNT = 64 |
Protected Attributes | |
aggregated_stats_buffer | shards_ [STAT_SHARD_COUNT] |
To facilitate calculating values of status variables aggregated per all THDs in real-time, each THD will update its stats into a matching buffer shard.
Later we will aggregate the values accross all the shards to get the final values.
This mechanism avoids possible contentions if all THDs would write directly to a single shared global buffer.
void aggregated_stats::flush | ( | ) |
|
inline |
uint64_t aggregated_stats::get_single_total | ( | size_t | offset | ) |
void aggregated_stats::get_total | ( | aggregated_stats_buffer & | result | ) |
|
protected |
|
staticconstexpr |