test(fspy): benchmark tracking overhead#566
Open
wan9chi wants to merge 24 commits into
Open
Conversation
Add a single multithreaded open-and-close workload, a Linux static variant, and three-platform Namespace reporting with PR/main baselines. Co-authored-by: GPT-5.6 Codex <codex@openai.com>
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
Make the reporter shell explicit and document why its text-only workflow_run boundary is intentionally safe. Co-authored-by: GPT-5.6 Codex <codex@openai.com>
Allow upload-artifact to include the dot-prefixed benchmark results directory. Co-authored-by: GPT-5.6 Codex <codex@openai.com>
Use a shorter process-level sampling window and inherit child stderr so runtime failures remain diagnosable. Co-authored-by: GPT-5.6 Codex <codex@openai.com>
Use pull-request write permission for the sticky benchmark report endpoint. Co-authored-by: GPT-5.6 Codex <codex@openai.com>
Preferring an earlier run of the same PR as the baseline masked cumulative regressions, so the baseline is now always the latest main artifact. Gate the main baseline artifact name on refs/heads/main so a workflow_dispatch run from another branch cannot pollute it. Remove the fork report workflow: workflow_run events carry an empty pull_requests array for PRs from forks, so its trigger condition could never match. Fork PRs keep job summaries and artifacts. Fold the PR comment assembly and upsert into fspy-benchmark.mjs. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
wan9chi
marked this pull request as ready for review
July 24, 2026 02:38
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8541d088c2
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Node runs .mts files directly by stripping types, so the script stays build-free while gaining typed structures for the result JSON, Criterion estimates, and GitHub API payloads. The new tsconfig gives the scripts directory Node types and enforces erasable-only syntax. Comment the non-obvious constraints: baseline selection, re-run exclusion, ratio normalization, and the workload constants mirrored from the Criterion bench. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The Linux and Windows runner images preinstall Node 20, which cannot run .mts files; type stripping needs the pinned 22.19. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
With a single pass over the fixture, the tracked/untracked delta on the preload paths (2-8 ms) is the same order as spawn-time variance on CI runners: overhead swung 11 points between identical runs, and on Windows the confidence interval exceeded the delta. Repeat the open loop 16 times so per-open interception cost dominates, extend the measurement window to five seconds, and render each mean's confidence interval in the report. Bump the result schema and skip comparisons across schema versions, since ratios from different workloads are not comparable. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: GPT-5 Codex <codex@openai.com>
fspy benchmarklinuxmacoswindows |
Co-authored-by: GPT-5 Codex <codex@openai.com>
Co-authored-by: GPT-5 Codex <codex@openai.com>
Co-authored-by: GPT-5 Codex <codex@openai.com>
Co-authored-by: GPT-5 Codex <codex@openai.com>
Co-authored-by: GPT-5 Codex <codex@openai.com>
Co-authored-by: GPT-5 Codex <codex@openai.com>
Co-authored-by: GPT-5 Codex <codex@openai.com>
Co-authored-by: GPT-5 Codex <codex@openai.com>
Co-authored-by: GPT-5 Codex <codex@openai.com>
Co-authored-by: GPT-5 Codex <codex@openai.com>
Co-authored-by: GPT-5 Codex <codex@openai.com>
Co-authored-by: GPT-5 Codex <codex@openai.com>
wan9chi
force-pushed
the
agent/benchmark-fspy-overhead
branch
from
July 24, 2026 21:52
0414876 to
c1c6d7a
Compare
wan9chi
force-pushed
the
agent/benchmark-fspy-overhead
branch
9 times, most recently
from
July 26, 2026 07:21
4c59cd4 to
df5ac00
Compare
The reported number was the difference between a tracked and an untracked launch, which is not reproducible: identically configured runners disagree on absolute launch times by tens of percent, so the same commit measured 23.3 ms and 26.8 ms for the same workload on Linux, and on macOS the difference kept landing below zero and was clamped to 1 ns. A baseline saved on main cannot tell a regression from that. Measure what fspy actually costs a process instead, as two separate things, each in the way that reproduces best. Starting a process under tracking stays a wall-clock measurement, because that is the quantity, reported as a share of an untracked launch measured back to back. Normalizing that way cancels most of the difference between runner instances, and reporting a share rather than a difference keeps a given slowdown moving the number by the same amount on every platform. Interception is now timed from inside the target, which reports how long its batches of opens took. A launch is one number covering milliseconds, so anything the runner does during it lands in the result; batches are a few microseconds long and there are hundreds per launch, so the median discards the ones the scheduler spoiled. That took the spread on macOS from 4% to 0.7%, and it made the benchmark faster, because a handful of launches now carries more information than hundreds did. Runs agree within about 1% to 4%, measured by benchmarking the same commit on six runner instances per platform. Two rows are left out where they do not reproduce: concurrent accesses on macOS, where a second busy thread makes every open cost about three times as much by an amount that changes from launch to launch, and the tail of seccomp accesses, which is dominated by how quickly the runner wakes the supervisor. Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
wan9chi
force-pushed
the
agent/benchmark-fspy-overhead
branch
from
July 26, 2026 09:16
cb282eb to
b75f933
Compare
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.

Motivation
fspy does not have a stable cross-platform benchmark that isolates the wall-clock cost it adds to tracked child processes. A small synthetic workload makes regressions visible without introducing real-world repository variance.
Changes
LD_PRELOAD.mainresult.