weirflow 0.1.0

GPU-first dataflow analysis primitives for Vyre and Santh compiler pipelines.
Documentation
/// Runtime counters for [`super::FixedPointResidentGraphCache`].
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct FixedPointResidentGraphCacheStats {
    /// Successful lookups that avoided resident graph upload.
    pub hits: u64,
    /// Lookups that uploaded invariant graph buffers.
    pub misses: u64,
    /// Resident graph uploads performed by this cache.
    pub resident_uploads: u64,
    /// Cumulative resident graph bytes uploaded by this cache.
    pub resident_upload_bytes: u64,
    /// Cumulative resident graph upload bytes avoided by cache hits.
    pub resident_avoided_upload_bytes: u64,
    /// Resident graph entries evicted to stay within the retained-byte limit.
    pub evictions: u64,
    /// Current resident graph bytes retained by the cache.
    pub retained_bytes: usize,
    /// Current resident graph entry count.
    pub entries: usize,
}

impl FixedPointResidentGraphCacheStats {
    /// Backend-neutral resident graph reuse telemetry for this cache snapshot.
    #[must_use]
    pub const fn resident_graph_reuse_telemetry(self) -> vyre::ResidentGraphReuseTelemetry {
        vyre::ResidentGraphReuseTelemetry::from_counters(
            self.misses,
            self.hits,
            self.resident_upload_bytes,
            self.resident_avoided_upload_bytes,
        )
    }
}