captrack-pgo 0.1.0

Profile-guided capacity optimization for Rust collections — measure with dhat or captrack, propose data-driven Vec::with_capacity(N) values, apply in-place.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
//! Profile backends — sources of `SiteStats` for the planner.
//!
//! Each backend implements [`Profile::sites`] returning aggregated per-site
//! statistics.  The planner consumes the trait, so the rest of the pipeline
//! is backend-agnostic.

use crate::model::SiteStats;

pub mod captrack;
pub mod dhat;

pub trait Profile {
    fn sites(&self) -> anyhow::Result<Vec<SiteStats>>;
}