mdbx: statistics of page operations.

Related to https://github.com/erthink/libmdbx/issues/186

Change-Id: Ia00e6e0df9a65f880517ca33e7f444a0526b96e1
This commit is contained in:
Leonid Yuriev
2021-04-27 18:02:11 +03:00
parent 3bbf5d03e2
commit f95a277ac5
5 changed files with 156 additions and 15 deletions

17
mdbx.h
View File

@@ -2239,6 +2239,23 @@ struct MDBX_envinfo {
/** Current environment mode.
* The same as \ref mdbx_env_get_flags() returns. */
uint32_t mi_mode;
/** Statistics of page operations.
* \details Overall statistics of page operations of all (running, completed
* and aborted) transactions in the current multi-process session (since the
* first process opened the database). */
struct {
uint64_t newly; /**< Quantity of a new pages added */
uint64_t cow; /**< Quantity of pages copied for update */
uint64_t clone; /**< Quantity of parent's dirty pages clones
for nested transactions */
uint64_t split; /**< Page splits */
uint64_t merge; /**< Page merges */
uint64_t spill; /**< Quantity of spilled dirty pages */
uint64_t unspill; /**< Quantity of unspilled/reloaded pages */
uint64_t wops; /**< Number of explicit write operations (not a pages)
to a disk */
} mi_pgop_stat;
};
#ifndef __cplusplus
/** \ingroup c_statinfo */