![]() |
MySQL 26.7.0
Source Code Documentation
|
Per index buffer pool statistics. 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 | reset (const index_id_t &id) |
| Set the count for given id to 0. More... | |
| void | dec (const index_id_t &id) |
| Decrement the number of pages for a given index with 1. More... | |
| void | dec_if_tracked_page (const page_t *frame) |
| Decrement the page count if a frame currently satisfies the accounting predicate. More... | |
| void | inc_if_tracked_page (const page_t *frame) |
| Increment the page count if a frame currently satisfies the accounting predicate. More... | |
| bool | is_tracked_page (const page_t *frame) |
| Check whether a frame currently satisfies the accounting predicate. 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 | |
| void | change_if_tracked_page (const page_t *frame, bool increment) |
| Change the page count if a frame currently satisfies the accounting predicate. More... | |
| bool | should_skip (const index_id_t &id) |
| Assess if we should skip a page from accounting. More... | |
Static Private Member Functions | |
| static space_id_t | get_space_id (const page_t *frame) |
| Gets the space id from a page image. More... | |
Private Attributes | |
| ut_lock_free_hash_t * | m_store |
| (key, value) storage. More... | |
Per index buffer pool statistics.
This tracks the number of logical buffer pool file pages that currently satisfy all of these predicates:
For compressed tables, the compressed image and the uncompressed frame are two possible in-memory representations of the same buffer pool page. They are counted once while the page id remains cached. Discarding only the uncompressed frame must not decrement the count if the compressed descriptor remains cached.
This is a key,value store where the key is a packed index_id_t and the value is the number of cached leaf pages that belong to the index.
|
inline |
Constructor.
|
inline |
Destructor.
|
inlineprivate |
Change the page count if a frame currently satisfies the accounting predicate.
| [in] | frame | buffer frame |
| [in] | increment | true to increment, false to decrement |
|
inline |
Decrement the number of pages for a given index with 1.
| [in] | id | id of the index whose count to decrement |
|
inline |
Decrement the page count if a frame currently satisfies the accounting predicate.
| [in] | frame | buffer frame |
|
inline |
Get the number of pages in the buffer pool for a given index.
| [in] | id | id of the index whose pages to peek |
|
inlinestaticprivate |
Gets the space id from a page image.
Do not use page_get_space_id() here: it asserts that the frame is page-aligned, but compressed page images are allocated by the buddy allocator and need not satisfy that assertion.
| [in] | frame | page image |
|
inline |
Increment the number of pages for a given index with 1.
| [in] | id | id of the index whose count to increment |
|
inline |
Increment the page count if a frame currently satisfies the accounting predicate.
| [in] | frame | buffer frame |
|
inline |
Check whether a frame currently satisfies the accounting predicate.
| [in] | frame | buffer frame |
|
inline |
Set the count for given id to 0.
| [in] | id | id of the index whose count will be reset |
|
inlineprivate |
Assess if we should skip a page from accounting.
| [in] | id | index_id of the page |
|
private |
(key, value) storage.