mirror of
https://github.com/neondatabase/neon.git
synced 2026-10-29 06:56:47 +00:00
carry stats across eviction & on-demand download
This commit is contained in:
committed by
Christian Schwarz
parent
63ad7c4461
commit
8ce21eb7e3
@@ -253,12 +253,20 @@ pub struct LayerAccessStatFullDetails {
|
||||
pub access_kind: LayerAccessKind,
|
||||
}
|
||||
|
||||
#[derive(Debug, Copy, Clone, Serialize, Deserialize)]
|
||||
#[serde(tag = "kind")]
|
||||
pub enum LayerResidenceStatus {
|
||||
Resident { timestamp_millis_since_epoch: u128 },
|
||||
Evicted { timestamp_millis_since_epoch: u128 },
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize)]
|
||||
pub struct LayerAccessStats {
|
||||
pub access_count_by_access_kind: HashMap<LayerAccessKind, u64>,
|
||||
pub task_kind_access_flag: Vec<&'static str>,
|
||||
pub first: Option<LayerAccessStatFullDetails>,
|
||||
pub most_recent: Vec<LayerAccessStatFullDetails>,
|
||||
pub most_recent_residence_changes: Vec<LayerResidenceStatus>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Copy, Clone, Serialize, Deserialize)]
|
||||
|
||||
Reference in New Issue
Block a user