Files
neon/libs
Christian Schwarz 0ed5f2858b maintain access stats for historic layers
This patch adds basic access statistics for historic layers
and exposes them in the management API's `LayerMapInfo`.

We record the accesses in the `{Delta,Image}Layer::load()` function
because it's the common path of
* page_service (`Timline::get_reconstruct_data()`)
* Compaction (`PersistentLayer::iter()` and `PersistentLayer::key_iter()`)

There is a killswitch in pageserver.toml to disable statistics gathering
to support before/after benchmarks. With the killswitch enabled, the
overhead of this feature is the function call and the atomic load.

Preceding PRs:
- #3504 add RequestContext plumbing for layer access stats

This is PR https://github.com/neondatabase/neon/pull/3496
2023-01-31 18:48:26 +01:00
..
2023-01-16 15:17:28 +00:00