Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/heap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,9 @@ pub struct HeapWalkReport {
pub diagnostic_count: usize,
pub unreadable_gaps: usize,
pub refused_headers: u64,
/// Committed VS bytes the walk declined to decode because it could not place a chunk
/// boundary in them; see [`crate::pool::PoolSnapshot::unplaced_bytes`].
pub unplaced_bytes: u64,
pub stalls: WalkStalls,
}

Expand Down Expand Up @@ -669,6 +672,7 @@ fn from_pool_snapshot(
.filter(|allocation| allocation.state == HeapState::Unreadable)
.count(),
refused_headers: snapshot.refused_chunks,
unplaced_bytes: snapshot.unplaced_bytes,
stalls: snapshot.stalls,
};
let diagnostics = HeapDiagnosticReport {
Expand Down
3 changes: 3 additions & 0 deletions src/pool/index.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ pub(crate) struct PoolIndex {
pub stalls: WalkStalls,
/// Carried through from [`PoolSnapshot::refused_chunks`].
pub refused_chunks: u64,
/// Carried through from [`PoolSnapshot::unplaced_bytes`].
pub unplaced_bytes: u64,
row_postings: HashMap<RowIdentity, Vec<usize>>,
span_rows: Vec<RowIdentity>,
}
Expand Down Expand Up @@ -91,6 +93,7 @@ impl PoolIndex {
budget_expired: snapshot.budget_expired,
stalls: snapshot.stalls,
refused_chunks: snapshot.refused_chunks,
unplaced_bytes: snapshot.unplaced_bytes,
row_postings,
span_rows,
}
Expand Down
4 changes: 4 additions & 0 deletions src/pool/query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,9 @@ pub struct PoolSnapshotReport {
/// Chunk headers the walk refused and resynchronised past; see
/// [`crate::pool::PoolSnapshot::refused_chunks`] for why this is not read off a diagnostic.
pub refused_chunks: u64,
/// Committed VS bytes the walk declined to decode because it could not place a chunk
/// boundary in them; see [`crate::pool::PoolSnapshot::unplaced_bytes`].
pub unplaced_bytes: u64,
}

/// How much of the pool a walk covered.
Expand Down Expand Up @@ -319,6 +322,7 @@ fn report_of(index: &PoolIndex) -> PoolSnapshotReport {
diagnostics: index.diagnostics.clone(),
stalls: index.stalls,
refused_chunks: index.refused_chunks,
unplaced_bytes: index.unplaced_bytes,
}
}

Expand Down
2 changes: 2 additions & 0 deletions src/pool/render.rs
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,7 @@ mod tests {
budget_expired: false,
stalls: Default::default(),
refused_chunks: 0,
unplaced_bytes: 0,
diagnostics: PoolDiagnostics::from_iter([
"per-session paged heaps are not included".to_string()
]),
Expand Down Expand Up @@ -508,6 +509,7 @@ mod tests {
budget_expired: false,
stalls: Default::default(),
refused_chunks: 0,
unplaced_bytes: 0,
diagnostics: PoolDiagnostics::default(),
});
let dml_chunks = render_pool_map(
Expand Down
Loading
Loading