pub struct MetricsRecorder { /* private fields */ }Expand description
Builds a metrics file turn by turn, from the arena’s reports, recording each line only on change.
Implementations§
Source§impl MetricsRecorder
impl MetricsRecorder
pub fn new(declaration: &Declaration, seats: u32) -> Self
Sourcepub fn turn(
&mut self,
turn: u32,
series: &[Vec<f32>],
events: &[(u32, Option<u32>)],
) -> Result<(), String>
pub fn turn( &mut self, turn: u32, series: &[Vec<f32>], events: &[(u32, Option<u32>)], ) -> Result<(), String>
Record one turn’s series values (one entry per declared series, each with one value per line) and events (by declared index).
pub fn limits(&mut self, limits: Vec<String>)
pub fn platform(&mut self, track: SeriesTrack)
pub fn finish( self, declaration: &Declaration, places: Vec<Vec<u32>>, decided_by: String, stats: Vec<Vec<f64>>, ) -> Result<Metrics, String>
Trait Implementations§
Source§impl Clone for MetricsRecorder
impl Clone for MetricsRecorder
Auto Trait Implementations§
impl Freeze for MetricsRecorder
impl RefUnwindSafe for MetricsRecorder
impl Send for MetricsRecorder
impl Sync for MetricsRecorder
impl Unpin for MetricsRecorder
impl UnsafeUnpin for MetricsRecorder
impl UnwindSafe for MetricsRecorder
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