pub struct Recorder<W: Write> { /* private fields */ }Expand description
A dependency-free tidy-CSV sink: one row per sketch element. Columns:
run_id,backend,dist,M,K,N,site,role,stat,idx,value. Tidy/long form so
scalars (idx=0), per-channel vectors (idx=channel), and histograms
(idx=bin) all share one flat schema that pandas/polars can groupby.
Implementations§
Source§impl<W: Write> Recorder<W>
impl<W: Write> Recorder<W>
pub fn new(w: W) -> Result<Self>
Sourcepub fn record(
&mut self,
run_id: u64,
step: u64,
backend: &str,
dist: &str,
m: usize,
k: usize,
n: usize,
specs: &[StatSpec],
outs: &[Vec<f32>],
) -> Result<()>
pub fn record( &mut self, run_id: u64, step: u64, backend: &str, dist: &str, m: usize, k: usize, n: usize, specs: &[StatSpec], outs: &[Vec<f32>], ) -> Result<()>
Record one call’s sketches. run_id groups calls into a sequence and
step orders them within it (0 for independent runs); outs is
run()’s output; specs the injection manifest.
pub fn flush(&mut self) -> Result<()>
Auto Trait Implementations§
impl<W> Freeze for Recorder<W>where
W: Freeze,
impl<W> RefUnwindSafe for Recorder<W>where
W: RefUnwindSafe,
impl<W> Send for Recorder<W>where
W: Send,
impl<W> Sync for Recorder<W>where
W: Sync,
impl<W> Unpin for Recorder<W>where
W: Unpin,
impl<W> UnsafeUnpin for Recorder<W>where
W: UnsafeUnpin,
impl<W> UnwindSafe for Recorder<W>where
W: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more