Metric_Buffer extends the circular buffer, Stat_Buffer, with a two-way read/write capability such that it can be shared between multiple collectors.
More...
|
| | Metric_Buffer ()=default |
| |
| | Metric_Buffer (bool no_lock, PSI_memory_key memory_key) |
| |
| | Metric_Buffer (PSI_rwlock_key rwlock_key, PSI_memory_key memory_key) |
| |
| bool | writeable () |
| |
| void | set_writeable (bool writeable) |
| |
| int | write (const T &record) |
| |
| template<typename U > |
| auto | write (const U &arg) -> std::enable_if_t< std::is_constructible_v< T, U >, int > |
| |
| | Stat_Buffer ()=default |
| |
| | Stat_Buffer (bool no_lock, PSI_memory_key memory_key) |
| |
| | Stat_Buffer (PSI_rwlock_key rwlock_key, PSI_memory_key memory_key) |
| |
| virtual | ~Stat_Buffer () |
| |
| | Stat_Buffer (const Stat_Buffer &)=default |
| |
| Stat_Buffer & | operator= (const Stat_Buffer &)=default |
| |
| | Stat_Buffer (Stat_Buffer &&) noexcept=default |
| |
| Stat_Buffer & | operator= (Stat_Buffer &&) noexcept=default |
| |
| int | read (T &record, unsigned int row_num) |
| | Read an element of the stat buffer. More...
|
| |
| int | read_last (T &record) |
| | Read the last element of the stat buffer. More...
|
| |
| int | lock_read () |
| | Acquire a read lock for a shared buffer. More...
|
| |
| void | unlock () |
| | Unlock a read or write lock for a shared buffer. More...
|
| |
| int | read_no_lock (T &record, unsigned int row_num) |
| | Read an element from the circular buffer by logical row index. More...
|
| |
| int | read_impl (T &record, size_t row_num) |
| |
| int | write (const T &record) |
| | Write one element into the circular buffer at the current head position. More...
|
| |
| int | write_impl (const T &record) |
| |
| void | resize (size_t new_size) |
| | Resize the stat buffer, preserve the most recent data. More...
|
| |
| void | resize_impl (size_t new_size) |
| |
| void | reset () |
| | Reset the state of the buffer. More...
|
| |
| void | reset_no_lock () |
| | Reset the buffer. More...
|
| |
| void | reset_impl () |
| |
| bool | map_logical_to_row_no_lock (uint64_t logical_idx, int &row_out) const |
| | Map a global logical index to the current ring-buffer row. More...
|
| |
| bool | map_logical_to_row (uint64_t logical_idx, int &row_out) const |
| |
| bool | map_logical_to_row_impl (uint64_t logical_idx, int &row_out) const |
| |
| mysql_rwlock_t * | get_rwlock () |
| |
| size_t | max_size () const |
| |
| size_t | index () const |
| |
| size_t | count () const |
| |
| size_t | total_written () const |
| |
| bool | full () const |
| |
| bool | wrapped () const |
| |
template<typename
T>
class hm::Metric_Buffer< T >
Metric_Buffer extends the circular buffer, Stat_Buffer, with a two-way read/write capability such that it can be shared between multiple collectors.