MCPcopy Create free account
hub / github.com/Bloom-Engine/engine / fake_frame

Function fake_frame

native/shared/src/profiler.rs:370–375  ·  view source on GitHub ↗

Drive the profiler through `frame_end` purely on the CPU side (gpu_enabled stays false). Each "frame" pushes a single sample with the given cpu_us so the histogram totals are known.

(p: &mut Profiler, cpu_us: f64)

Source from the content-addressed store, hash-verified

368 /// sample with the given cpu_us so the histogram totals are
369 /// known.
370 fn fake_frame(p: &mut Profiler, cpu_us: f64) {
371 p.frame.push(FrameSample { label: "fake", cpu_us, gpu_us: None });
372 // Skip the gpu readback path (no device available) and go
373 // straight to the CPU-only histogram + drain path.
374 p.frame_end_cpu();
375 }
376
377 #[test]
378 fn frame_history_empty_before_any_frames() {

Calls 2

frame_end_cpuMethod · 0.80
pushMethod · 0.45