pub struct StatsReport {
pub total_frames: u64,
pub total_wall_secs: f64,
pub overall_fps: f64,
pub gpu_frames: u64,
pub gpu_path_pct: f64,
pub phases: Vec<(String, PhaseSnapshot)>,
pub encode_push_per_frame_us: Vec<(u32, u64)>,
}Fields§
§total_frames: u64§total_wall_secs: f64§overall_fps: f64§gpu_frames: u64§gpu_path_pct: f64§phases: Vec<(String, PhaseSnapshot)>§encode_push_per_frame_us: Vec<(u32, u64)>C5: per-frame encode_push timing ring, in microseconds.
Vec<(frame_id, duration_us)> — lets us post-mortem spikes that
the histogram summary would smooth over.
Implementations§
Source§impl StatsReport
impl StatsReport
Sourcepub fn write_json(&self, path: &Path) -> Result<()>
pub fn write_json(&self, path: &Path) -> Result<()>
Write the report as pretty-printed JSON to path. Creates parent
directories as needed. Best-effort: errors are returned to the
caller (which logs them in app.rs).
Sourcepub fn print_summary(&self)
pub fn print_summary(&self)
Pretty-print a one-line summary to stdout. Used by integration
tests and the optional MCRAW_STATS_DUMP console echo.
Trait Implementations§
Source§impl Clone for StatsReport
impl Clone for StatsReport
Source§fn clone(&self) -> StatsReport
fn clone(&self) -> StatsReport
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for StatsReport
impl Debug for StatsReport
Source§impl<'de> Deserialize<'de> for StatsReport
impl<'de> Deserialize<'de> for StatsReport
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for StatsReport
impl RefUnwindSafe for StatsReport
impl Send for StatsReport
impl Sync for StatsReport
impl Unpin for StatsReport
impl UnsafeUnpin for StatsReport
impl UnwindSafe for StatsReport
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more