Profiler: no smlib category left in its tests and help

The profile test's externally timed span prints as "external call", as
it is now recorded; diagnostics.profile's help no longer lists the C
API's smlib category, and the STEP import's profile test wants the
solidcore category alone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DtL5M41G8Nua7HvuFPZkmJ
This commit is contained in:
jyviko
2026-11-02 18:51:26 -05:00
parent f70f55eff2
commit b2fd08e85a
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -55,7 +55,7 @@ pub static COMMANDS: &[CommandSpec] = &[
trace?: path (write the recorded spans as a Chrome trace-event file, for chrome://tracing or Perfetto). Returns what \
was recorded before enabled and reset apply: {compiled, enabled, wall_ms, spans, dropped, by_category: [{category, \
self_ms, share}], rows: [{category, name, count, total_ms, self_ms, max_ms}], rows_total, trace?}, the rows the most \
self time first. Categories: solidcore (the kernel's calls), smlib (SMLib's C API calls, timed by the C API, when it is asked for), kernel, feature (one per feature \
self time first. Categories: solidcore (the kernel's calls), kernel, feature (one per feature \
computed, by its type), doc, command, import (STEP/IGES stages), io. Self time is a span's time less the spans \
inside it; total counts its outermost run only. Recording also starts with SOLIDCRAFT_PROFILE=1, the CLI's \
--profile and the app's preference; off, it costs nothing measurable. Read-only",
+1 -1
View File
@@ -1143,7 +1143,7 @@ mod tests {
let p = &out["profile"];
let rows = p["rows"].as_array().unwrap();
let has = |cat: &str| rows.iter().any(|r| r["category"] == cat);
assert!(has("import") && (has("solidcore") || has("smlib")), "{p}");
assert!(has("import") && has("solidcore"), "{p}");
assert!(p["by_category"].as_array().is_some_and(|c| !c.is_empty()) && p["wall_ms"].as_f64().is_some_and(|w| w > 0.0), "{p}");
}
+1 -1
View File
@@ -57,7 +57,7 @@ fn nested_spans_have_self_and_total_time() {
let cats = r.by_category();
assert_eq!(cats.iter().map(|c| c.0).collect::<Vec<_>>().len(), 2);
let t = r.table(10);
assert!(t.contains("test outer") && t.contains("smlib call") && t.contains("self time by category"), "{t}");
assert!(t.contains("test outer") && t.contains("external call") && t.contains("self time by category"), "{t}");
}
#[test]