Enum criterion::Throughput
source · pub enum Throughput {
Bytes(u64),
BytesDecimal(u64),
Elements(u64),
}
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§
source§impl Clone for Throughput
impl Clone for Throughput
source§fn clone(&self) -> Throughput
fn clone(&self) -> Throughput
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
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>,
source§impl PartialEq<Throughput> for Throughput
impl PartialEq<Throughput> for Throughput
source§fn eq(&self, other: &Throughput) -> bool
fn eq(&self, other: &Throughput) -> bool
self
and other
values to be equal, and is used
by ==
.