Skip to content
API REFERENCEUsage guides →

cellpack::opt::PageTrace ​

struct

Module contract · All interfaces

At a glance ​

pub struct PageTrace { /* private fields */ }

Canonical page requests: cells in access order, each cell’s pages in file order. This serial reference has no execution window, reuse-gap reservation or management cost.

Member index ​

5 of 5 members

  • from_sourceExpands accesses into physical page requests through the catalog’s locations; errors when page ids, accesses or page uses would not fit u32 .
  • from_pagesPage ids are dense integers in [0, universe) ; no hidden renumbering.
  • page_usesRequests in the trace.
  • distinct_pagesDistinct pages it requests.
  • optimumBelady with bypass: on a miss the requested page participates in the farthest-next-use comparison. Dead pages are never retained.

Methods and associated constants ​

from_source ​

pub fn from_source(catalog: &DataSource, accesses: &[CellId]) -> Result<Self>

Expands accesses into physical page requests through the catalog’s locations; errors when page ids, accesses or page uses would not fit u32.

from_pages ​

pub fn from_pages(pages: &[u32], universe: usize) -> Result<Self>

Page ids are dense integers in [0, universe); no hidden renumbering.

page_uses ​

pub fn page_uses(&self) -> usize

Requests in the trace.

distinct_pages ​

pub fn distinct_pages(&self) -> usize

Distinct pages it requests.

optimum ​

pub fn optimum(&self, capacity_pages: usize) -> CacheSummary

Belady with bypass: on a miss the requested page participates in the farthest-next-use comparison. Dead pages are never retained.

Contract reference ​

See the module reference for semantic input/output rules, units, allocation, mutation, failure behavior, and lifetime requirements. Declarations and documented members are synchronized from the crate source.

Definition