Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore/fix(benchmark): fix benchmark on node 16+ #4906

Merged
merged 1 commit into from Mar 6, 2022

Conversation

SukkaW
Copy link
Member

@SukkaW SukkaW commented Mar 4, 2022

What does it do?

Since Node.js 16, the perf_hook will buffer the performance entry list before the observer callback is called, causing the race condition. This PR fixes that.

This fixes the issue that the benchmark result can not be collected on Node.js 16

Pull request tasks

  • Add test cases for the changes.
  • Passed the CI test.

@SukkaW SukkaW requested a review from himself65 March 4, 2022 06:04
@github-actions
Copy link

github-actions bot commented Mar 4, 2022

How to test

git clone -b chore-fix-benchmark https://github.com/SukkaW/hexo.git
cd hexo
npm install
npm test

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.03%) to 98.105% when pulling ac1f036 on SukkaW:chore-fix-benchmark into f281fc2 on hexojs:master.

@SukkaW SukkaW merged commit 14d8edc into hexojs:master Mar 6, 2022
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.

None yet

3 participants