pub struct GpuReport {
pub frame_number: u64,
pub hook_timings_us: [Option<u32>; 4],
pub cpu_preparation_time_us: Option<u32>,
pub cpu_submission_time_us: Option<u32>,
}
Expand description
A report of GPU performance timings for a single frame.
Fields§
§frame_number: u64
The frame number this report corresponds to.
hook_timings_us: [Option<u32>; 4]
Raw timestamp query results for each GPU hook, in microseconds.
The order corresponds to the GpuHook
enum definition.
cpu_preparation_time_us: Option<u32>
The CPU time spent preparing the frame, in microseconds.
cpu_submission_time_us: Option<u32>
The CPU time spent submitting commands for the frame, in microseconds.
Implementations§
Source§impl GpuReport
impl GpuReport
Sourcepub fn get_hook_timing_us(&self, hook: GpuHook) -> Option<u32>
pub fn get_hook_timing_us(&self, hook: GpuHook) -> Option<u32>
Gets the timing for a specific GPU performance hook, in microseconds.
Sourcepub fn main_pass_duration_us(&self) -> Option<u32>
pub fn main_pass_duration_us(&self) -> Option<u32>
Calculates the duration of the main render pass, in microseconds.
Sourcepub fn frame_total_duration_us(&self) -> Option<u32>
pub fn frame_total_duration_us(&self) -> Option<u32>
Calculates the total GPU duration for the frame, in microseconds.
Sourcepub fn set_hook_timing_us(&mut self, hook: GpuHook, timing_us: Option<u32>)
pub fn set_hook_timing_us(&mut self, hook: GpuHook, timing_us: Option<u32>)
Sets the timing for a specific hook, in microseconds.
Trait Implementations§
impl Copy for GpuReport
Auto Trait Implementations§
impl Freeze for GpuReport
impl RefUnwindSafe for GpuReport
impl Send for GpuReport
impl Sync for GpuReport
impl Unpin for GpuReport
impl UnwindSafe for GpuReport
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