-
Notifications
You must be signed in to change notification settings - Fork 29.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/nodejs/node into psj-dev
I added a testcase about executionAsyncResource with Http Agent. Refs: https://github.com/nodejs/node/blob/master/test/async-hooks/test-async-exec-resource-http.js Signed-off-by: psj-tar-gz <[email protected]>
- Loading branch information
Showing
144 changed files
with
6,789 additions
and
605 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: Close stalled issues and PRs | ||
on: | ||
schedule: | ||
- cron: "0 0 * * *" | ||
|
||
jobs: | ||
stale: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/stale@v3 | ||
with: | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
days-before-close: 30 | ||
stale-pr-label: stalled | ||
stale-issue-label: stalled | ||
close-issue-message: Closing this because it has stalled. Feel free to reopen if this issue is still relevant, or to ping the collaborator who labelled it stalled if you have any questions. | ||
close-pr-message: Closing this because it has stalled. Feel free to reopen if this PR is still relevant, or to ping the collaborator who labelled it stalled if you have any questions. | ||
# deactivates automatic removal of stalled label if issue gets any activity | ||
remove-stale-when-updated: false | ||
# deactivates automatic stale labelling as we prefer to do that manually | ||
days-before-stale: -1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: Comment on issues and PRs when labelled stalled | ||
on: | ||
issues: | ||
types: [labeled] | ||
pull_request_target: | ||
types: [labeled] | ||
|
||
jobs: | ||
staleComment: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Post comment | ||
if: github.event.label.name == 'stalled' | ||
env: | ||
COMMENTS_URL: ${{ github.event.issue.comments_url || github.event.pull_request.comments_url }} | ||
run: | | ||
curl -X POST $COMMENTS_URL \ | ||
-H "Content-Type: application/json" \ | ||
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ | ||
--data '{ "body": "This issue/PR was marked as stalled, it will be automatically closed in 30 days. If it should remain open, please leave a comment explaining why it should remain open." }' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
name: Require “Allow Edits” | ||
|
||
on: [pull_request] | ||
|
||
jobs: | ||
_: | ||
name: "Require “Allow Edits”" | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: ljharb/require-allow-edits@main | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
'use strict'; | ||
|
||
const common = require('../common.js'); | ||
const assert = require('assert').ok; | ||
const { performance } = require('perf_hooks'); | ||
const { nodeTiming, eventLoopUtilization } = performance; | ||
|
||
const bench = common.createBenchmark(main, { | ||
n: [1e6], | ||
method: [ | ||
'idleTime', | ||
'ELU_simple', | ||
'ELU_passed', | ||
], | ||
}); | ||
|
||
function main({ method, n }) { | ||
switch (method) { | ||
case 'idleTime': | ||
benchIdleTime(n); | ||
break; | ||
case 'ELU_simple': | ||
benchELUSimple(n); | ||
break; | ||
case 'ELU_passed': | ||
benchELUPassed(n); | ||
break; | ||
default: | ||
throw new Error(`Unsupported method ${method}`); | ||
} | ||
} | ||
|
||
function benchIdleTime(n) { | ||
bench.start(); | ||
for (let i = 0; i < n; i++) | ||
nodeTiming.idleTime; | ||
bench.end(n); | ||
} | ||
|
||
function benchELUSimple(n) { | ||
// Need to put this in setImmediate or will always return 0. | ||
setImmediate(() => { | ||
const elu = eventLoopUtilization(); | ||
assert(elu.active + elu.idle > 0); | ||
|
||
bench.start(); | ||
for (let i = 0; i < n; i++) | ||
eventLoopUtilization(); | ||
bench.end(n); | ||
}); | ||
} | ||
|
||
function benchELUPassed(n) { | ||
// Need to put this in setImmediate or will always return 0. | ||
setImmediate(() => { | ||
let elu = eventLoopUtilization(); | ||
assert(elu.active + elu.idle > 0); | ||
|
||
bench.start(); | ||
for (let i = 0; i < n; i++) | ||
elu = eventLoopUtilization(elu); | ||
bench.end(n); | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.