Skip to content

Add electron profiling package#80

Open
GuillaumeLagrange wants to merge 8 commits into
mainfrom
cod-2721-electron-profiling-package-scripts-and-write-docs-about-how
Open

Add electron profiling package#80
GuillaumeLagrange wants to merge 8 commits into
mainfrom
cod-2721-electron-profiling-package-scripts-and-write-docs-about-how

Conversation

@GuillaumeLagrange
Copy link
Copy Markdown
Contributor

Also dump moonrepo in the process

@GuillaumeLagrange GuillaumeLagrange force-pushed the cod-2721-electron-profiling-package-scripts-and-write-docs-about-how branch 3 times, most recently from c35bbbd to 2a47b32 Compare May 26, 2026 13:33
@GuillaumeLagrange GuillaumeLagrange force-pushed the cod-2721-electron-profiling-package-scripts-and-write-docs-about-how branch from 2a47b32 to af45d9e Compare May 26, 2026 13:38
@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented May 26, 2026

Merging this PR will improve performance by 33.71%

⚠️ Different runtime environments detected

Some benchmarks with significant performance changes were compared across different runtime environments,
which may affect the accuracy of the results.

Open the report in CodSpeed to investigate

⚡ 5 improved benchmarks
❌ 2 regressed benchmarks
✅ 138 untouched benchmarks
⏩ 23 skipped benchmarks1

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
Memory short body 408 B 536 B -23.88%
Memory short body 608 B 480 B +26.67%
Memory short body 608 B 480 B +26.67%
Memory wait 500ms 64.1 KB 15 KB ×4.3
Memory long body 1,088 B 960 B +13.33%
Simulation one 578.4 µs 400.4 µs +44.46%
WallTime switch 2 300 ns 336 ns -10.71%

Tip

Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.


Comparing cod-2721-electron-profiling-package-scripts-and-write-docs-about-how (24265df) with main (aa9d127)

Open in CodSpeed

Footnotes

  1. 23 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

GuillaumeLagrange and others added 5 commits May 26, 2026 16:06
The format target was broken on `packages/core/rollup.config.ts` because
prettier 2 cannot parse the modern `with { type: "json" }` import
attribute syntax. Bump prettier to ^3.8.3 (and prettier-plugin-organize-
imports to ^4.3.0 for compatibility), and align the other rollup
configs to `with` so the repo uses one syntax.

The organize-imports plugin parses through the workspace's installed
TypeScript, so bump TypeScript to ^5.6.3 too — 4.9.4 also rejects the
`with` syntax. Drop the explicit `Promise<typeof import("tinybench")>`
return type on WalltimeRunner.importTinybench(); TS 5.x's stricter type
equality flags it as incompatible with the inferred type on vitest's
NodeBenchmarkRunner base class.

Reformat ~30 source files where prettier 3's new `trailingComma: "all"`
default added trailing commas after multi-line arguments.

Refs COD-2721
Co-Authored-By: Claude <noreply@anthropic.com>
The tinybench and benchmark.js plugins each carried their own
near-identical implementation of "what file called withCodSpeed()",
built on stack-trace + find-up + getGitDir to compute a path relative
to the enclosing git repository.

Move the helper into @codspeed/core (next to getGitDir, which it
already depends on), accept a `depth` argument to skip indirection
frames the way benchmark.js needs, and rewire both plugins to import
from core. Drop the now-redundant stack-trace dependency from each
plugin's package.json — it lives on core alone now.

The benchmark.js-plugin integ tests mock @codspeed/core wholesale; add
getCallingFile to the un-mocked names alongside getGitDir so the URI
derivation still works under test.

Refs COD-2721
Co-Authored-By: Claude <noreply@anthropic.com>
The previous @typescript-eslint 5.58 and eslint 7.32 stack predated
TypeScript 5.x, and @typescript-eslint warned at startup that the
installed TS version was not officially supported. Bump eslint to
^8.57 and @typescript-eslint to ^8.57 — the latter officially supports
TS 5.x, which matches the recent TS bump.

The v8 rename surfaces a few rule-name changes that need to be applied
where the codebase used eslint-disable comments:

- @typescript-eslint/no-var-requires → no-require-imports
- @typescript-eslint/ban-types → no-unsafe-function-type for the
  Function-type uses in benchmark.js-plugin's add() overloads

Add a one-line disable for an intentionally-side-effecting expression
in benchmark.js-plugin/benches/sample.ts that the v8 recommended
config now flags as @typescript-eslint/no-unused-expressions.

Refs COD-2721
Co-Authored-By: Claude <noreply@anthropic.com>
@GuillaumeLagrange GuillaumeLagrange force-pushed the cod-2721-electron-profiling-package-scripts-and-write-docs-about-how branch from af45d9e to 24265df Compare May 26, 2026 14:06
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.

1 participant