Skip to content

[codex] Add batch lint memory benchmark#70

Merged
luojiyin1987 merged 2 commits into
masterfrom
codex/batch-memory-benchmark
Jul 6, 2026
Merged

[codex] Add batch lint memory benchmark#70
luojiyin1987 merged 2 commits into
masterfrom
codex/batch-memory-benchmark

Conversation

@luojiyin1987

@luojiyin1987 luojiyin1987 commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

This was generated by AI during triage.

Summary

  • add a Linux peak-memory benchmark for batch lint
  • generate temporary Markdown fixtures with configurable size and worker count
  • support repeated runs with machine-readable RSS and elapsed-time summaries
  • add a small smoke test and npm commands
  • reject unsupported platforms with a clear error

Why

Batch lint currently loads all Markdown content before linting. This PR establishes a repeatable baseline before the production data path is changed in a later PR.

Baseline

Node.js 24.15.0, 16 files, 1,000,010 bytes per file, three runs per worker setting:

Threads Median peak RSS RSS range Median wall time Time range
1 972,620 KiB 971,028–1,051,080 KiB 11.17s 9.87–11.45s
4 2,452,408 KiB 2,198,368–2,570,680 KiB 4.38s 4.08–4.48s

Platform scope

This benchmark intentionally supports Linux with GNU /usr/bin/time -v. macOS uses BSD time with different flags, output fields, and units. macOS support is left to a volunteer contribution that can include BSD output fixtures, unit-conversion tests, and real-device verification.

Impact

No production source or CLI behavior changes. The benchmark removes its temporary fixtures in a finally block.

Validation

  • npm test -- --runInBand: 45 tests passed
  • npm run build: passed
  • npx eslint --ext .ts,.tsx ./: passed
  • npm run test:benchmark-memory: passed
  • node --check scripts/benchmark-memory.mjs: passed
  • invalid --runs 0: exited non-zero
  • git diff --check: passed

Closes #69

@luojiyin1987 luojiyin1987 marked this pull request as ready for review July 6, 2026 02:35
@luojiyin1987 luojiyin1987 marked this pull request as draft July 6, 2026 02:44
@luojiyin1987 luojiyin1987 marked this pull request as ready for review July 6, 2026 02:45
@luojiyin1987 luojiyin1987 merged commit c081fe0 into master Jul 6, 2026
5 checks passed
@luojiyin1987 luojiyin1987 deleted the codex/batch-memory-benchmark branch July 6, 2026 02:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add repeatable batch lint peak-memory benchmark

1 participant