Add electron profiling package#80
Conversation
c35bbbd to
2a47b32
Compare
2a47b32 to
af45d9e
Compare
Merging this PR will improve performance by 33.71%
|
| 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)
Footnotes
-
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. ↩
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>
af45d9e to
24265df
Compare
Also dump moonrepo in the process