mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-10-25 02:07:09 -06:00
CLI: perf on Windows reports the cores busy and its working set, and the help lists --deep
On Windows, perf printed "load average ?": load_average runs sysctl or reads /proc/loadavg, and Windows has neither. The warning for a busy machine could not print, so a run over budget on a busy machine failed, where macOS and Linux warn and exit 0. perf --deep printed no memory rows, because rss_mb runs ps. --help did not list --deep. On Windows, perf now reads GetSystemTimes twice, one second apart, and its first line gives the cores busy on average over that second where macOS and Linux give the load average. It warns above three quarters of the cores, as on macOS and Linux: with all 32 logical processors of a test machine kept busy, the line read "cores busy 32.0" and a run with three budgets over exited 0. The --deep memory rows give the working set (GetProcessMemoryInfo). Both calls use winsafe 0.0.29, which Cargo.lock already lists for the desktop app; the CLI depends on it on Windows with the kernel and psapi features. The help lists --deep and says that a run over budget on a busy machine exits 0. perf's report on macOS and Linux does not change.
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
//! vectorcraft-cli convert IN OUT [--scale 2] [--artboard 0 | --range 1-3,5] [--outline-text] [--decimals N] [--replace-lossy] [--editing-data]
|
||||
//! vectorcraft-cli info FILE
|
||||
//! vectorcraft-cli bench FILE [--size 2880x1800] [--iters 5]
|
||||
//! vectorcraft-cli perf [--paths 50000]
|
||||
//! vectorcraft-cli perf [--paths 50000] [--deep]
|
||||
//! ```
|
||||
// Denied, not forbidden: the font listers shared with the desktop app allow it for their
|
||||
// DirectWrite (Windows) and CoreText (macOS) calls, and nothing else may.
|
||||
@@ -104,9 +104,11 @@ USAGE:
|
||||
Render FILE (any readable format) fitted to WxH (default 2880x1800) and print ms per frame
|
||||
(warm), multithreaded and single-threaded.
|
||||
|
||||
vectorcraft-cli perf [--paths N]
|
||||
Check the performance budgets (render, pan, hit test, save/load, SVG, Pathfinder) on a
|
||||
synthetic N-path document (default 50000). Exits non-zero if a budget is exceeded.
|
||||
vectorcraft-cli perf [--paths N] [--deep]
|
||||
Check the performance budgets (render, pan, hit test, save/load, SVG, Pathfinder, handle
|
||||
and segment drags) on a synthetic N-path document (default 50000). Exits non-zero if a
|
||||
budget is exceeded, unless the report says the machine is busy. --deep also times work with
|
||||
no budget yet and prints memory use (the working set on Windows).
|
||||
";
|
||||
|
||||
/// The usage text plus the formats `document.open` reads and `document.export` writes.
|
||||
|
||||
Reference in New Issue
Block a user