Struct slog_extlog::slog_test::ExpectedStatSnapshot
source · pub struct ExpectedStatSnapshot {
pub name: &'static str,
pub description: &'static str,
pub stat_type: StatType,
pub values: Vec<ExpectedStatSnapshotValue>,
pub buckets: Option<Buckets>,
}
Expand description
ExpectedStatSnapshot helper. E.g. ExpectedStatSnapshot { name: “test_group_bucket_counter”, description: “Test cumulative bucket counter with groups”, stat_type: BucketCounter, values: vec![ ExpectedStatSnapshotValue { group_values: vec![“one”.to_string(), “two”.to_string()], bucket_limit: Some(BucketLimit::Num(-8)), value: 0f64, }, ExpectedStatSnapshotValue { group_values: vec![“one”.to_string(), “two”.to_string()], bucket_limit: Some(BucketLimit::Num(0)), value: 0f64, }, ExpectedStatSnapshotValue { group_values: vec![“one”.to_string(), “two”.to_string()], bucket_limit: Some(BucketLimit::Unbounded), value: 3f64, }, ExpectedStatSnapshotValue { group_values: vec![“three”.to_string(), “four”.to_string()], bucket_limit: Some(BucketLimit::Num(-8)), value: 4f64, }, ExpectedStatSnapshotValue { group_values: vec![“three”.to_string(), “four”.to_string()], bucket_limit: Some(BucketLimit::Num(0)), value: 4f64, }, ExpectedStatSnapshotValue { group_values: vec![“three”.to_string(), “four”.to_string()], bucket_limit: Some(BucketLimit::Unbounded), value: 4f64, }, ], buckets: Some(Buckets::new(BucketMethod::CumulFreq, “bucket”, &[-8, 0])), }
Fields§
§name: &'static str
Name of the stat
description: &'static str
Description of the stat
stat_type: StatType
Type of the stat
values: Vec<ExpectedStatSnapshotValue>
A vec of the SnapShot values expected for this snapshot.
buckets: Option<Buckets>
The buckets for the stat.