pub enum Throughput {
Bytes(u32),
Elements(u32),
}
Expand description
Enum representing different ways of measuring the throughput of benchmarked code. If the throughput setting is configured for a benchmark then the estimated throughput will be reported as well as the time per iteration.
Variants§
Bytes(u32)
Measure throughput in terms of bytes/second. The value should be the number of bytes
processed by one iteration of the benchmarked code. Typically, this would be the length of
an input string or &[u8]
.
Elements(u32)
Measure throughput in terms of elements/second. The value should be the number of elements processed by one iteration of the benchmarked code. Typically, this would be the size of a collection, but could also be the number of lines of input text or the number of values to parse.
Trait Implementations§
Source§impl Clone for Throughput
impl Clone for Throughput
Source§fn clone(&self) -> Throughput
fn clone(&self) -> Throughput
Returns a copy 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 moreSource§impl Debug for Throughput
impl Debug for Throughput
Source§impl<'de> Deserialize<'de> for Throughput
impl<'de> Deserialize<'de> for Throughput
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Throughput
impl RefUnwindSafe for Throughput
impl Send for Throughput
impl Sync for Throughput
impl Unpin for Throughput
impl UnwindSafe for Throughput
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)