Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ ffmpeg-linux
.vscode-resolve-source-map-cache
.vscode-charts
.tmp
.memory-leak-report

# Logs
logs
Expand Down
36 changes: 36 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,42 @@ npm run e2e

<!-- -->

## Memory-leak issue radar

Generate a self-contained HTML overview of memory-leak issues across popular
JavaScript, TypeScript, and Node.js repositories:

```sh
npm run memory-leak-report
open .memory-leak-report/index.html
```

The generator uses GitHub GraphQL to discover repositories with at least 5,000
stars, filters them to projects with a root `package.json`, and scans up to 600
repositories by default. It searches each issue tracker's titles and bodies for
the phrase `"memory leak"`. Docusaurus and Rspack are included as seed
repositories. Authentication comes from `GITHUB_TOKEN`, `GH_TOKEN`, or the
active `gh` CLI login.

GitHub requests are sequential and paced by 750 milliseconds. The generator
automatically retries transient and secondary-rate-limit responses, and waits
for the primary GraphQL limit to reset before it is exhausted. Use
`--request-delay-ms` to adjust the pacing when needed.

Repositories on the built-in denylist are skipped by owner or repository name,
with case and punctuation ignored. Pass `--include-ignored` to include them;
passing one explicitly with `--repo owner/name` also overrides the denylist.

The HTML report works directly from disk. It includes repository search and
sorting, exact open/closed match counts, and a two-column issue board. Common
options include:

```sh
npm run memory-leak-report -- --min-stars 1000 --max-repos 100
npm run memory-leak-report -- --repo owner/project --issues-per-state 50
npm run memory-leak-report -- --no-seed-repos --output /tmp/memory-leaks.html
```

## Measures

### MemoryCity
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"measure-codex-webview-load-time": "npm --prefix packages/build run measure-codex-webview-load-time --",
"measure-warm-codex-webview-load-time": "npm --prefix packages/build run measure-warm-codex-webview-load-time --",
"measure-webview-memory": "npm --prefix packages/build run measure-webview-memory --",
"memory-leak-report": "npm --prefix packages/build run memory-leak-report --",
"backport-prs": "npm --prefix packages/build run backport-prs --"
},
"repository": {
Expand Down
1 change: 1 addition & 0 deletions packages/build/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"measure-warm-codex-webview-load-time": "node src/measureCodexWebviewLoadTime.ts --warm-cache",
"measure-webview-memory": "node src/measureWebviewMemory.ts",
"measure-webview-load-time": "node src/measureWebviewLoadTime.ts",
"memory-leak-report": "node src/memoryLeakReport.ts",
"test": "node --unhandled-rejections=warn --experimental-vm-modules ../../node_modules/jest/bin/jest.js --detectOpenHandles --forceExit"
},
"devDependencies": {
Expand Down
Loading
Loading