Enum criterion::Throughput
source · [−]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(u64)
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]
.
BytesDecimal(u64)
Equivalent to Bytes, but the value will be reported in terms of kilobytes (1000 bytes) per second instead of kibibytes (1024 bytes) per second, megabytes instead of mibibytes, and gigabytes instead of gibibytes.
Elements(u64)
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
sourceimpl Clone for Throughput
impl Clone for Throughput
sourcefn clone(&self) -> Throughput
fn clone(&self) -> Throughput
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for Throughput
impl Debug for Throughput
sourceimpl<'de> Deserialize<'de> for Throughput
impl<'de> Deserialize<'de> for Throughput
sourcefn 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
sourceimpl PartialEq<Throughput> for Throughput
impl PartialEq<Throughput> for Throughput
sourcefn eq(&self, other: &Throughput) -> bool
fn eq(&self, other: &Throughput) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourceimpl Serialize for Throughput
impl Serialize for Throughput
impl Eq for Throughput
impl StructuralEq for Throughput
impl StructuralPartialEq for Throughput
Auto Trait Implementations
impl RefUnwindSafe for Throughput
impl Send for Throughput
impl Sync for Throughput
impl Unpin for Throughput
impl UnwindSafe for Throughput
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to key
and return true
if they are equal.