pub struct PerfOverlay {
pub mode: PerfOverlayMode,
pub thresholds: PerfThresholds,
pub current: TimeSample,
pub kit_timings: KitTimings,
pub post_fx_passes: u32,
pub post_fx_names: Vec<String>,
/* private fields */
}Expand description
Full performance overlay state.
Fields§
§mode: PerfOverlayMode§thresholds: PerfThresholds§current: TimeSample§kit_timings: KitTimings§post_fx_passes: u32§post_fx_names: Vec<String>Implementations§
Source§impl PerfOverlay
impl PerfOverlay
pub fn new() -> Self
Sourcepub fn begin_frame(&mut self)
pub fn begin_frame(&mut self)
Call at the very start of each frame.
Sourcepub fn end_frame(
&mut self,
gpu_ms: f32,
particles: u64,
draw_calls: u32,
vram_mb: f32,
ram_mb: f32,
)
pub fn end_frame( &mut self, gpu_ms: f32, particles: u64, draw_calls: u32, vram_mb: f32, ram_mb: f32, )
Call at the end of each frame with measured values.
pub fn begin_kit(&mut self, kit: &'static str)
pub fn end_kit(&mut self, kit: &'static str)
pub fn avg_fps(&self) -> f32
pub fn p95_frame_ms(&self) -> f32
pub fn max_frame_ms(&self) -> f32
pub fn bottleneck(&self) -> Bottleneck
pub fn frame_status(&self) -> FrameStatus
pub fn render_text(&self) -> String
pub fn render_compact(&self) -> String
pub fn render_normal(&self) -> String
pub fn render_verbose(&self) -> String
pub fn render_graph(&self) -> String
pub fn status_line(&self) -> String
Trait Implementations§
Source§impl Debug for PerfOverlay
impl Debug for PerfOverlay
Auto Trait Implementations§
impl Freeze for PerfOverlay
impl RefUnwindSafe for PerfOverlay
impl Send for PerfOverlay
impl Sync for PerfOverlay
impl Unpin for PerfOverlay
impl UnsafeUnpin for PerfOverlay
impl UnwindSafe for PerfOverlay
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.