Publish the resource benchmark harness - #1
Merged
Conversation
TermTree's memory, CPU, and cold-start claims rest on this harness, so it is published here for anyone to run: a benchmark nobody can run is an assertion, not evidence. It is the one deliberate exception to this repository's source-free posture, licensed Apache-2.0 under benchmark/LICENSE and scoped to that directory alone. The harness measures an attribution asymmetry that every off-the-shelf tool gets wrong in one direction or the other: on macOS, WebKit helper processes are launchd-parented and so invisible to a process-tree walk, while LaunchServices does not enumerate an Electron app's helpers. Measuring either runtime with one mechanism alone undercounts it severalfold. The harness takes the union. Safety and portability, so it can be run by someone other than its authors: - Every subject is seeded, launched, and measured against a disposable per-run home directory created under the OS temp dir. The runner's real application profiles are never read or written, and an explicit --home pointing at the real home (or an ancestor of it) is refused rather than obeyed. A pristine profile is also what makes independent runs comparable at all. - Subjects are launched with `open -n -F --env HOME=<scratch>`, keeping a real LaunchServices registration so helper attribution still resolves. - A run refuses to start when a subject is already running, keyed on bundle identifier rather than app name: two differently named bundles can share an identifier, and the second launch is then handed off to the running instance and exits having measured nothing. - Stale assumptions about TermTree fail loudly instead of silently degrading: unrecognised cold-start log marks, a missing app data directory, and an unconsumed seed each invalidate the sample by name. - Collaborator, CodeNomad, and diri seeders have never been checked against a real install. Their heavier tiers report invalidReason "seed-format-unverified" rather than being counted as valid. - Bundle paths, the seeded repo, and the agent CLI are all overridable, so installs outside /Applications work. - doctor names every unmet prerequisite and how to clear it, and changes nothing. Documented as macOS-only, and explicit that the method and within-run ratios travel across machines while absolute figures do not.
The nightly toolchain is installed second, so rustup makes it the default and clippy and test both ran under it. The nightly install carries rustfmt and nothing else, so clippy failed outright on the first run. Name the toolchain in every step rather than depending on install order.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TermTree's memory, CPU, and cold-start claims rest on a measurement harness. This publishes it, so anyone can run it against their own installed applications rather than take the numbers on trust. A benchmark nobody can run is an assertion, not evidence.
benchmark/is the one deliberate exception to this repository's source-free posture, licensed Apache-2.0 underbenchmark/LICENSEand scoped to that directory alone.LICENSE.mdandREADME.mdare updated to say so — the previous wording asserted the repository contained no source at all.What it measures
On macOS, every off-the-shelf attribution method is biased, and in a direction that depends on the runtime under test. WebKit helper processes are launchd-parented, so a process-tree walk misses them entirely; LaunchServices, conversely, does not enumerate an Electron app's helper processes. Measuring either runtime with one mechanism alone undercounts it severalfold. The harness takes the union of both, and reports memory two ways rather than picking the flattering one.
Safety and portability
The harness seeds application state and launches real applications, so being safe for someone other than its authors to run is a precondition, not a nicety.
--homepointing at the real home directory, or an ancestor of it, is refused rather than obeyed. A pristine profile is also what makes independent runs comparable at all.open -n -F --env HOME=<scratch>, which keeps a real LaunchServices registration so helper attribution still resolves.invalidReason: "seed-format-unverified"rather than being counted as valid./Applicationswork.doctornames every unmet prerequisite and how to clear it, and changes nothing.Scope and honesty
macOS only, and structurally so:
lsappinfo,footprint,vm_stat,notifyutil, andpmsethave no Linux or Windows equivalents.The README is explicit that the method and within-run ratios travel between machines while absolute figures do not — a reader on different hardware will not reproduce a given number and should not expect to.
The CodeNomad Electron-vs-Tauri pair is a supported standalone invocation: one MIT codebase, two runtimes, TermTree not a participant. Someone can run that alone to check the attribution correction behaves as claimed before believing any TermTree figure.
Verification
CI (new to this repository) runs the format check, clippy, and tests on macOS. It deliberately never runs a sweep — that needs an exclusive, quiesced machine for hours, and numbers from a shared CI runner would be misleading.
175 unit tests pass.
benchmark/doc/resource-benchmark-harness-testing.mddocuments the manual pass, and records what is deliberately not verifiable without a quiesced machine — including launch isolation against a real application, which needs the subject quit first.No measurement results are published here yet.