pub struct CheckpointSerializationBaseline {
pub entry_count: usize,
pub serialize_us: u64,
pub deserialize_us: u64,
pub tolerance: f64,
}Expand description
Checkpoint serialization performance baseline.
Fields§
§entry_count: usizeNumber of history entries
serialize_us: u64Expected serialization time in microseconds
deserialize_us: u64Expected deserialization time in microseconds
tolerance: f64Tolerance factor
Implementations§
Source§impl CheckpointSerializationBaseline
impl CheckpointSerializationBaseline
Sourcepub const ENTRIES_1000: Self
pub const ENTRIES_1000: Self
Baseline for 1000 entries.
§Measurement Methodology
These values are derived from benchmark tests that:
- Create checkpoint state with 1000 execution history entries
- Measure
serde_json::to_string()serialization time - Measure
serde_json::from_str()deserialization time - Run multiple iterations to get representative average
§Tolerance Rationale
Serialization performance varies significantly based on:
- CPU architecture and speed
- Memory bus speed
- System load (other processes)
- Compiler optimizations (debug vs release)
We use 2x tolerance (100% headroom) to avoid false positives while still catching catastrophic regressions (e.g., O(n²) algorithms).
Trait Implementations§
Source§impl Clone for CheckpointSerializationBaseline
impl Clone for CheckpointSerializationBaseline
Source§fn clone(&self) -> CheckpointSerializationBaseline
fn clone(&self) -> CheckpointSerializationBaseline
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for CheckpointSerializationBaseline
impl RefUnwindSafe for CheckpointSerializationBaseline
impl Send for CheckpointSerializationBaseline
impl Sync for CheckpointSerializationBaseline
impl Unpin for CheckpointSerializationBaseline
impl UnsafeUnpin for CheckpointSerializationBaseline
impl UnwindSafe for CheckpointSerializationBaseline
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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