forked from 1b-agent/opencadstudio-upstream
bench(navigation): add viewport navigation and spatial candidate benchmarks
- Add Section 19 benchmarks covering camera pan viewport uniform updates, spatial hover candidate search, and viewport data assembly scaling - Add navigation telemetry probes in src/perf.rs (active only when PERF=1) to track frame interval, batched input moves, and layout-draw gap
This commit is contained in:
1 parent
af41825a33
commit
7d008c4914
6 files changed
+220
-4
No files matched your search
@@ -530,7 +530,9 @@ impl OpenCADStudio {
|
||||
}
|
||||
}
|
||||
if let Some(started) = perf_started {
|
||||
let elapsed_ms = started.elapsed().as_secs_f64() * 1000.0;
|
||||
let elapsed_us = started.elapsed().as_micros() as u64;
|
||||
crate::perf::note_update_time(elapsed_us);
|
||||
let elapsed_ms = elapsed_us as f64 / 1000.0;
|
||||
if elapsed_ms >= 5.0 {
|
||||
crate::perf_record!("[perf] update {:>7.1}ms message={perf_label}", elapsed_ms,);
|
||||
}
|
||||
|
||||
@@ -1201,6 +1201,7 @@ impl OpenCADStudio {
|
||||
}
|
||||
|
||||
pub(in crate::app) fn on_viewport_move(&mut self, p: Point) -> Task<Message> {
|
||||
crate::perf::note_pointer_move();
|
||||
// A ribbon dropdown is open over the viewport. Its backdrop
|
||||
// cannot swallow cursor motion — in iced 0.14 mouse_area/opaque
|
||||
// capture only button presses, never CursorMoved — so the move
|
||||
@@ -5683,6 +5684,7 @@ properties={:.1}ms picked={}",
|
||||
pub(super) fn on_viewport_scroll(&mut self, delta: mouse::ScrollDelta) -> Task<Message> {
|
||||
match scroll_intent(delta, self.touchpad_pan, self.ctrl_down) {
|
||||
ScrollIntent::Zoom { notches } => {
|
||||
crate::perf::note_scroll_zoom();
|
||||
let mut s =
|
||||
notches * crate::app::settings::zoom_notch_steps(self.zoom_factor);
|
||||
if self.zoom_wheel_reversed {
|
||||
|
||||
@@ -202,6 +202,7 @@ impl OpenCADStudio {
|
||||
crate::perf_record!("[perf] view {:>7.1}ms", elapsed_ms);
|
||||
}
|
||||
}
|
||||
crate::perf::note_view_finish();
|
||||
element
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user