diff --git a/crates/bevy_diagnostic/src/diagnostic.rs b/crates/bevy_diagnostic/src/diagnostic.rs index 4256d72e98bef..7d8cfaebcacd7 100644 --- a/crates/bevy_diagnostic/src/diagnostic.rs +++ b/crates/bevy_diagnostic/src/diagnostic.rs @@ -119,6 +119,14 @@ impl Diagnostic { pub fn get_max_history_length(&self) -> usize { self.max_history_length } + + pub fn values(&self) -> impl Iterator { + self.history.iter().map(|x| &x.value) + } + + pub fn measurements(&self) -> impl Iterator { + self.history.iter() + } } /// A collection of [Diagnostic]s