forked from 1b-agent/opencadstudio-upstream
perf: say which message caused an edit's latency
The first measurement showed four consecutive edits at ~192 ms each with a handler cost of 0.55 ms. That is below the `update` line's 5 ms threshold, so the log reports the latency but not what asked for it — and whether a live command preview is bumping the geometry epoch on every mouse move is exactly the question the numbers raise. `nav-prepare` now carries the message label alongside the op. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
b4ae4cad4e
commit
d267083a29
3 files changed
+21
-3
No files matched your search
@@ -1216,8 +1216,9 @@ impl shader::Primitive for Primitive {
|
||||
let prepare_ms = nav_prepare_started.elapsed().as_secs_f64() * 1000.0;
|
||||
if let Some(sample) = self.nav_perf {
|
||||
crate::perf::record(format_args!(
|
||||
"[perf] nav-prepare op={} space={} mode={} input={:.2}ms build={:.2}ms prepare={:.2}ms elapsed={:.2}ms viewports={}",
|
||||
"[perf] nav-prepare op={} cause={} space={} mode={} input={:.2}ms build={:.2}ms prepare={:.2}ms elapsed={:.2}ms viewports={}",
|
||||
sample.op.label(),
|
||||
sample.cause,
|
||||
sample.space,
|
||||
sample.mode,
|
||||
sample.input_ms,
|
||||
|
||||
Reference in new issue
Block a user