Struct apdex::Apdex [−][src]
pub struct Apdex { pub threshold: f64, pub satisfied: u64, pub tolerating: u64, pub frustrated: u64, }
Represents Apdex score after samples were characterize into one of the three groups. When displayed a Uniform Output will be used.
Fields
threshold: f64
Satisfied Zone/Tolerating Zone threshold in seconds.
satisfied: u64
Count of response times characterized as Satisfied.
tolerating: u64
Count of response times characterized as Tolerating.
frustrated: u64
Count of response times characterized as Frustrated.
Methods
impl Apdex
[src]
impl Apdex
pub fn new(threshold: f64) -> Apdex
[src]
pub fn new(threshold: f64) -> Apdex
Crate new Apdex value given Satisfied Zone/Tolerating Zone threshold time in seconds.
pub fn with_respnse_times(
threshold: f64,
response_times: impl IntoIterator<Item = Result<f64, ()>>
) -> Apdex
[src]
pub fn with_respnse_times(
threshold: f64,
response_times: impl IntoIterator<Item = Result<f64, ()>>
) -> Apdex
Crate new Apdex value with samples characterized from provided sample set.
Err
samples are counted as Frustrated samples.
pub fn with_hit_rate(
threshold: f64,
assumed_hit_rate: f64,
response_times: impl IntoIterator<Item = Result<f64, ()>>
) -> Apdex
[src]
pub fn with_hit_rate(
threshold: f64,
assumed_hit_rate: f64,
response_times: impl IntoIterator<Item = Result<f64, ()>>
) -> Apdex
Crate new Apdex value with samples characterized from provided sample set with assumption of cache presence and given hit rate.
Provided samples are interpreted as cache misses and characterized.
Err
samples are counted as Frustrated samples.
Apdex Satisfied group sample count is adjusted by simulated cache hit sample count.
pub fn insert(&mut self, response_time: Result<f64, ()>)
[src]
pub fn insert(&mut self, response_time: Result<f64, ()>)
Characterize given sample.
Err
samples are counted as Frustrated samples.
pub fn total(&self) -> u64
[src]
pub fn total(&self) -> u64
Returns total number of characterized samples
pub fn no_samples(&self) -> bool
[src]
pub fn no_samples(&self) -> bool
True if no samples were characterized
pub fn small_group(&self) -> bool
[src]
pub fn small_group(&self) -> bool
True if less than 100 samples were characterized
pub fn score(&self) -> Option<f64>
[src]
pub fn score(&self) -> Option<f64>
Calculate Apdex Score value.
If no samples were characterized None
is returned.
pub fn score_rating(&self) -> ApdexRating
[src]
pub fn score_rating(&self) -> ApdexRating
Wraps this object in type implementing Display of the rating (a word) for the score
pub fn rating_word(&self) -> &'static str
[src]
pub fn rating_word(&self) -> &'static str
Returns the rating word: Excellent, Good, Fair, Poor, Unacceptable or NoSample
pub fn color(&self) -> Color
[src]
pub fn color(&self) -> Color
Trait Implementations
impl Debug for Apdex
[src]
impl Debug for Apdex
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Default for Apdex
[src]
impl Default for Apdex
impl Display for Apdex
[src]
impl Display for Apdex