MySQL 9.1.0
Source Code Documentation
buf_stat_per_index_t Class Reference

Per index buffer pool statistics - contains how many pages for each index are cached in the buffer pool(s). More...

#include <buf0stats.h>

Public Member Functions

 buf_stat_per_index_t ()
 Constructor. More...
 
 ~buf_stat_per_index_t ()
 Destructor. More...
 
void inc (const index_id_t &id)
 Increment the number of pages for a given index with 1. More...
 
void dec (const index_id_t &id)
 Decrement the number of pages for a given index with 1. More...
 
uint64_t get (const index_id_t &id)
 Get the number of pages in the buffer pool for a given index. More...
 

Private Member Functions

bool should_skip (const index_id_t &id)
 Assess if we should skip a page from accounting. More...
 

Private Attributes

ut_lock_free_hash_tm_store
 (key, value) storage. More...
 

Detailed Description

Per index buffer pool statistics - contains how many pages for each index are cached in the buffer pool(s).

This is a key,value store where the key is the index id and the value is the number of pages in the buffer pool that belong to this index.

Constructor & Destructor Documentation

◆ buf_stat_per_index_t()

buf_stat_per_index_t::buf_stat_per_index_t ( )
inline

Constructor.

◆ ~buf_stat_per_index_t()

buf_stat_per_index_t::~buf_stat_per_index_t ( )
inline

Destructor.

Member Function Documentation

◆ dec()

void buf_stat_per_index_t::dec ( const index_id_t id)
inline

Decrement the number of pages for a given index with 1.

Parameters
[in]idid of the index whose count to decrement

◆ get()

uint64_t buf_stat_per_index_t::get ( const index_id_t id)
inline

Get the number of pages in the buffer pool for a given index.

Parameters
[in]idid of the index whose pages to peek
Returns
number of pages

◆ inc()

void buf_stat_per_index_t::inc ( const index_id_t id)
inline

Increment the number of pages for a given index with 1.

Parameters
[in]idid of the index whose count to increment

◆ should_skip()

bool buf_stat_per_index_t::should_skip ( const index_id_t id)
inlineprivate

Assess if we should skip a page from accounting.

Parameters
[in]idindex_id of the page
Returns
true if it should not be accounted

Member Data Documentation

◆ m_store

ut_lock_free_hash_t* buf_stat_per_index_t::m_store
private

(key, value) storage.


The documentation for this class was generated from the following file: