Repository navigation
Report RSS and the commit charge on Windows - #552
Merged
Merged
Conversation
Member
|
Can we define Windows-only modules (and ideally methods as well) only when it's Windows? Unlike what's executed inside Combined with #549 (which may not need to be done inside |
hsbt
force-pushed
the
claude/frosty-einstein-9209d8
branch
from
October 15, 2026 21:38
acd67d9 to
feec42e
Compare
hsbt
force-pushed
the
claude/frosty-einstein-9209d8
branch
from
October 29, 2026 02:59
feec42e to
3bd4752
Compare
Windows has neither /proc nor ps nor getrusage, so RSS and MAXRSS were always 0. The working set and its peak from GetProcessMemoryInfo are the closest equivalents, read in a file that only Windows requires. Fiddle is loaded with the harness, because loading it after Bundler.setup resets Bundler between iterations. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Changes in private memory on Windows show up in the commit charge (PagefileUsage of GetProcessMemoryInfo) more than in the working set. The result JSON keeps it and its peak as commit_charge and peak_commit_charge. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
hsbt
force-pushed
the
claude/frosty-einstein-9209d8
branch
from
October 29, 2026 03:25
3bd4752 to
a4c594d
Compare
Member
Author
|
👌 I moved the memory counter code into a separate module and load it only on Windows. |
Member
|
Thanks 👍 |
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.
On Windows,
rss,maxrssand the RSS samples taken after each iteration are always 0, because there is no/proc,psorgetrusageto read them from.This reports the working set and its peak from
GetProcessMemoryInfoas RSS and MAXRSS. It also records the commit charge and its peak ascommit_chargeandpeak_commit_charge, since private allocations on Windows show up there more than in the working set.Only the benchmark process can read these between iterations and after its final GC, so this lives in the harness. The code is in
lib/harness/windows_memory_counters.rb, which only Windows requires, so other platforms load nothing for it. It loads fiddle when the harness loads, because loading it later under Bundler resets Bundler between iterations.Generated with Claude Code