mirror of
https://github.com/emilk/egui.git
synced 2026-08-31 13:50:04 -04:00
Much more accurate cpu_usage timing (#3913)
`frame.info.cpu_usage` now includes time for tessellation and rendering, but excludes vsync and context switching.
This commit is contained in:
@@ -757,7 +757,13 @@ pub struct IntegrationInfo {
|
||||
/// `None` means "don't know".
|
||||
pub system_theme: Option<Theme>,
|
||||
|
||||
/// Seconds of cpu usage (in seconds) of UI code on the previous frame.
|
||||
/// Seconds of cpu usage (in seconds) on the previous frame.
|
||||
///
|
||||
/// This includes [`App::update`] as well as rendering (except for vsync waiting).
|
||||
///
|
||||
/// For a more detailed view of cpu usage, use the [`puffin`](https://crates.io/crates/puffin)
|
||||
/// profiler together with the `puffin` feature of `eframe`.
|
||||
///
|
||||
/// `None` if this is the first frame.
|
||||
pub cpu_usage: Option<f32>,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user