Skip to content
Open
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
2 changes: 1 addition & 1 deletion .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ jobs:
uses: node-modules/github-actions/.github/workflows/node-test.yml@master
with:
os: 'ubuntu-latest'
version: '18, 20, 22, 24'
version: '20, 22, 24, 25'
install: npm run install-wrk > wrk.log && npm install && cat /proc/cpuinfo
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
"egg1": "npm:egg@1",
"egg2": "npm:egg@2",
"egg3": "npm:egg@3",
"koa": "^2.13.4",
"egg4": "npm:egg@beta",
"koa2": "npm:koa@^2.13.4",
"koa-router": "^12.0.0",
"nunjucks": "^3.0.1"
},
Expand All @@ -23,7 +24,7 @@
},
"scripts": {
"install-wrk": "pwd && ls -l . && sh install-wrk.sh",
"test-simple": "NODE_DEBUG=egg-cluster:app_worker simple/run.sh",
"test-simple": "simple/run.sh",
"test-simple-view": "simple_view/run.sh",
"test-simple-passport": "simple_passport/run.sh",
"test": "cat stats-header.csv > stats.csv && npm run test-simple && npm run test-simple-view && npm run test-simple-passport && cp stats.csv plot/all.csv",
Expand Down
68 changes: 68 additions & 0 deletions profiler-egg-v4/AGGREGATED.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# Aggregated CPU Profile Analysis

## Overview
- Profiles Analyzed: 4
- Total Ticks: 36076
- Total Unaccounted: 14600 (40.5%)

## Per-Worker Summary
| Worker | Ticks | JS% | Unaccounted% |
|--------|-------|-----|------------|
| isolate-0x82080c000-47318-v8-47318.log | 9016 | 54.1% | 45.7% |
| isolate-0xa6480c000-47317-v8-47317.log | 9021 | 53.2% | 46.8% |
| isolate-0xb6280c000-47319-v8-47319.log | 9031 | 53.7% | 46.3% |
| isolate-0xc7480c000-47316-v8-47316.log | 9008 | 54.8% | 23.0% |

Comment on lines +8 to +15
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Address markdownlint MD058 (blank lines around tables) to keep CI/doc lint clean.
Add a blank line before/after each table block.

Also applies to: 16-44, 45-68

🧰 Tools
🪛 markdownlint-cli2 (0.18.1)

9-9: Tables should be surrounded by blank lines

(MD058, blanks-around-tables)

🤖 Prompt for AI Agents
In profiler-egg-v4/AGGREGATED.md around lines 8 to 15, the Markdown table lacks
the required blank line before and after the table per markdownlint rule MD058;
add a blank line immediately above the table header and one blank line
immediately after the table block. Apply the same change to the other table
blocks referenced (lines ~16-44 and ~45-68) so each table is separated by a
blank line above and below.

⚠️ Potential issue | 🟠 Major

Fix broken Markdown tables: escape | in function names (renders incorrectly today).
The regex entry (Line 30) contains a literal pipe (|), which splits the table into extra columns (MD056) and drops content. Also consider stripping/shortening absolute /Users/... paths for portability.

Proposed minimal fix in this file (escape the pipe in that row; optional: wrap in backticks):

-| 84 | 21 | 0.23% | RegExp: ^[\^_`a-zA-Z\-0-9!#$%&'*+.|~]+$ |
+| 84 | 21 | 0.23% | RegExp: ^[\^_`a-zA-Z\-0-9!#$%&'*+.\|~]+$ |

Also applies to: 16-44, 45-68

🧰 Tools
🪛 markdownlint-cli2 (0.18.1)

9-9: Tables should be surrounded by blank lines

(MD058, blanks-around-tables)

🤖 Prompt for AI Agents
In profiler-egg-v4/AGGREGATED.md around lines 8-15 (and also apply same changes
to ranges 16-44 and 45-68), a table row contains an unescaped pipe character in
a function/regex entry which breaks the Markdown table rendering; edit the
affected rows to escape any literal '|' as '\|' or wrap the whole function/regex
cell in backticks to prevent column splitting, and while here replace long
absolute /Users/... paths with shortened basenames or a placeholder (e.g.,
filename only or {REDACTED_PATH}) for portability.

## Top 25 Aggregated JavaScript Functions
| Total Ticks | Avg/Worker | % Total | Function |
|-------------|------------|---------|----------|
| 2497 | 624 | 6.92% | JS: *promiseInitHook node:internal/async_hooks:328:25 |
| 335 | 84 | 0.93% | JS: *promiseBeforeHook node:internal/async_hooks:346:27 |
| 279 | 70 | 0.77% | JS: *promiseAfterHook node:internal/async_hooks:353:26 |
| 156 | 39 | 0.43% | JS: *initWithInjectProperty file:///Users/fengmk2/git/github.com/eggjs/benchmark/node_modules/@eggjs/tegg-runtime/dist/impl/EggObjectImpl.js:20:33 |
| 139 | 35 | 0.39% | JS: *OrdinaryGetMetadata /Users/fengmk2/git/github.com/eggjs/benchmark/node_modules/reflect-metadata/Reflect.js:591:37 |
| 121 | 30 | 0.34% | JS: *destroy file:///Users/fengmk2/git/github.com/eggjs/benchmark/node_modules/@eggjs/tegg-runtime/dist/model/AbstractEggContext.js:22:18 |
| 117 | 29 | 0.32% | JS: *objectPostCreate file:///Users/fengmk2/git/github.com/eggjs/benchmark/node_modules/@eggjs/lifecycle/dist/LifycycleUtil.js:38:27 |
| 114 | 29 | 0.32% | JS: *init file:///Users/fengmk2/git/github.com/eggjs/benchmark/node_modules/@eggjs/tegg-runtime/dist/model/AbstractEggContext.js:71:15 |
| 113 | 28 | 0.31% | RegExp: [^\t\x20-\x7e\x80-\xff] |
| 106 | 27 | 0.29% | JS: *getOrCreateEggObject file:///Users/fengmk2/git/github.com/eggjs/benchmark/node_modules/@eggjs/tegg-runtime/dist/factory/EggContainerFactory.js:28:38 |
| 98 | 25 | 0.27% | JS: *objectPreCreate file:///Users/fengmk2/git/github.com/eggjs/benchmark/node_modules/@eggjs/lifecycle/dist/LifycycleUtil.js:32:26 |
| 84 | 21 | 0.23% | RegExp: ^[\^_`a-zA-Z\-0-9!#$%&'*+.|~]+$ |
| 83 | 21 | 0.23% | JS: *handleRequest file:///Users/fengmk2/git/github.com/eggjs/benchmark/node_modules/@eggjs/koa/dist/application.js:150:31 |
| 82 | 21 | 0.23% | JS: *_storeHeader node:_http_outgoing:455:22 |
| 81 | 20 | 0.22% | JS: *emitInitScript node:internal/async_hooks:503:24 |
| 75 | 19 | 0.21% | JS: *session file:///Users/fengmk2/git/github.com/eggjs/benchmark/node_modules/@eggjs/session/node_modules/koa-session/dist/esm/index.js:184:34 |
| 73 | 18 | 0.20% | JS: *processTicksAndRejections node:internal/process/task_queues:72:35 |
| 72 | 18 | 0.20% | JS: *dispatch file:///Users/fengmk2/git/github.com/eggjs/benchmark/node_modules/@eggjs/core/node_modules/@eggjs/router/dist/Router.js:122:26 |
| 70 | 18 | 0.19% | JS: *dispatch /Users/fengmk2/git/github.com/eggjs/benchmark/node_modules/@eggjs/koa/node_modules/koa-compose/index.js:35:23 |
| 63 | 16 | 0.17% | JS: *handleRequest file:///Users/fengmk2/git/github.com/eggjs/benchmark/node_modules/@eggjs/koa/dist/application.js:168:24 |
| 62 | 16 | 0.17% | JS: *parserOnIncoming node:_http_server:1073:26 |
| 57 | 14 | 0.16% | JS: *ctxLifecycleMiddleware file:///Users/fengmk2/git/github.com/eggjs/benchmark/node_modules/@eggjs/tegg-plugin/dist/lib/ctx_lifecycle_middleware.js:3:45 |
| 56 | 14 | 0.16% | JS: *destroy file:///Users/fengmk2/git/github.com/eggjs/benchmark/node_modules/@eggjs/tegg-runtime/dist/impl/EggObjectImpl.js:147:18 |
| 55 | 14 | 0.15% | JS: *bodyParser /Users/fengmk2/git/github.com/eggjs/benchmark/node_modules/egg4/node_modules/koa-bodyparser/index.js:63:35 |
| 52 | 13 | 0.14% | JS: *attachFinishedListener /Users/fengmk2/git/github.com/eggjs/benchmark/node_modules/on-finished/index.js:91:33 |

## Top 20 Aggregated V8 Builtins
| Total Ticks | Avg/Worker | % Total | Builtin |
|-------------|------------|---------|----------|
| 2075 | 519 | 5.75% | Builtin: KeyedLoadIC_Megamorphic |
| 831 | 208 | 2.30% | Builtin: KeyedStoreIC_Megamorphic |
| 753 | 188 | 2.09% | Builtin: GetProperty |
| 549 | 137 | 1.52% | Builtin: RunMicrotasks |
| 488 | 122 | 1.35% | Builtin: AsyncFunctionEnter |
| 413 | 103 | 1.14% | Builtin: FulfillPromise |
| 357 | 89 | 0.99% | Builtin: CallFunction_ReceiverIsNullOrUndefined |
| 309 | 77 | 0.86% | Builtin: FindOrderedHashMapEntry |
| 305 | 76 | 0.85% | Builtin: AsyncFunctionAwaitUncaught |
| 284 | 71 | 0.79% | Builtin: LoadIC |
| 256 | 64 | 0.71% | Builtin: Call_ReceiverIsNullOrUndefined |
| 242 | 61 | 0.67% | Builtin: ResolvePromise |
| 235 | 59 | 0.65% | Builtin: PromiseAll |
| 218 | 55 | 0.60% | Builtin: LoadIC_Megamorphic |
| 201 | 50 | 0.56% | Builtin: ResumeGeneratorTrampoline |
| 192 | 48 | 0.53% | Builtin: ObjectPrototypeHasOwnProperty |
| 170 | 43 | 0.47% | Builtin: RecordWriteSaveFP |
| 169 | 42 | 0.47% | Builtin: ArrayIteratorPrototypeNext |
| 146 | 37 | 0.40% | Builtin: PromisePrototypeThen |
| 137 | 34 | 0.38% | Builtin: NewPromiseCapability |

Loading