pub struct SerializationBenchmark {
pub bincode_serialize_time: Duration,
pub bincode_deserialize_time: Duration,
pub json_serialize_time: Duration,
pub json_deserialize_time: Duration,
pub bincode_size: usize,
pub json_size: usize,
pub iterations: usize,
}
Expand description
Serialization benchmark results
Fields§
§bincode_serialize_time: Duration
§bincode_deserialize_time: Duration
§json_serialize_time: Duration
§json_deserialize_time: Duration
§bincode_size: usize
§json_size: usize
§iterations: usize
Implementations§
Source§impl SerializationBenchmark
impl SerializationBenchmark
Sourcepub fn serialize_improvement_ratio(&self) -> f64
pub fn serialize_improvement_ratio(&self) -> f64
Get the performance improvement ratio
Sourcepub fn size_reduction_ratio(&self) -> f64
pub fn size_reduction_ratio(&self) -> f64
Get the size reduction ratio
Sourcepub fn print_summary(&self)
pub fn print_summary(&self)
Print a formatted summary
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SerializationBenchmark
impl RefUnwindSafe for SerializationBenchmark
impl Send for SerializationBenchmark
impl Sync for SerializationBenchmark
impl Unpin for SerializationBenchmark
impl UnwindSafe for SerializationBenchmark
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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 moreSource§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> SerializableKey for T
impl<T> SerializableKey for T
Source§impl<T> StorageAccess<T> for T
impl<T> StorageAccess<T> for T
Source§fn as_borrowed(&self) -> &T
fn as_borrowed(&self) -> &T
Borrows the value.
Source§fn into_taken(self) -> T
fn into_taken(self) -> T
Takes the value.