Repository navigation
Show progress during map and decompose, and add a real C# map benchmark - #135
Merged
Merged
Conversation
map and decompose print phase, done of total and elapsed seconds on stderr, after 5 s and at most every 5 s, on a terminal or with --progress. stdout is unchanged. scripts/bench-map.mjs maps a pinned public C# repository cold and warm and records wall time, peak RSS and file counts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts: # CHANGELOG.md
decompose spent most of its CPU scanning every edge for each node and type. The graph, the artifact model and the consistency check now share a per-type edge index. On Roslyn (35,502 files) a decompose dry run goes from 20.1 s to 8.0 s on the same store. Pins Roslyn in the corpus and times decompose in scripts/bench-map.mjs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Keeps both imports in runtime/cli/commands/map.mjs: historyNotice from #124 and progressFor from this PR. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Closes #89 (partly: see "Not in this PR").
Scenario to test map
progressFor: on a terminal it waits 5 s, then prints at most one line per 5 s--jsonstdout is only JSON--progress prints the phase and counts on stderr, and --json stdout stays JSON(map and decompose)\rabsent;progressForreturns null off a terminal unless forced--progressforces itwithout the flag, stderr carries no progress;--progress forces it off a terminaldocs/benchmarks.mdDecompose speed (FR-003, scenario 5)
Roslyn 20b549ba (public, 35,502 files), same store, Node 22.23.5, darwin arm64, one run each, shared machine:
Store 4,371 MB. #89's "decompose at most half of v0.3.3" is met on this run (0.40x). It is a single noisy run: I/O dominates the rest.
CPU profile (
node --cpu-prof): the old code spends about 3.5 s of self time ingraph.edgesand its filter callback (the per-type scan, repeated per node). With the edge index those frames are gone; what remains is store reads (readFileSync,iterate,fromStore). So the cause is the edge scan, but it is about a sixth of the old 20 s, not all of it. The in-memory adjacency in FR-003 was already there; the scan was per type.tests/unit/decompose/edge-index.test.mjsfailed before (28 scans) and passes now.Checks
npm test: 3629 tests, 3619 pass, 1 fail (the knownrequireHumanTTY), 9 skipped.Not in this PR
scripts/corpus.jsonand benchmarked.🤖 Generated with Claude Code