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

ci(benchmark): generate flamegraph #4000

Merged
merged 4 commits into from Jan 16, 2020
Merged

ci(benchmark): generate flamegraph #4000

merged 4 commits into from Jan 16, 2020

Conversation

@SukkaW
Copy link
Member

SukkaW commented Dec 21, 2019

What does it do?

Use 0x to generate a human readable flamegraph after benchmark. The flamegraph directory will be under ${TRAVIS_BUILD_DIR}/0x.

Before we could find a way to deploy the flamegraph, I will leave this PR as a draft.

How to test

git clone -b 0x-flamegraph https://github.com/sukkaw/hexo.git
cd hexo
npm install
npm test

Screenshots

The directory structure should like this:

0x
├── flamegraph.html
├── isolate-0x5af5020-1756-1756-v8.log
├── isolate-0x5af5020-1756-1756-v8.log.json
├── isolate-0x5af5020-1756-1756-v8.log.preprocess-ready
└── meta.json

0 directories, 5 files

And the flamegraph looks like this:

image

Pull request tasks

  • Add test cases for the changes.
  • Passed the CI test.
@SukkaW SukkaW added the #perfmatters label Dec 21, 2019
@SukkaW SukkaW requested review from curbengh and hexojs/core Dec 21, 2019
@coveralls

This comment has been minimized.

Copy link

coveralls commented Dec 21, 2019

Coverage Status

Coverage remained the same at 97.701% when pulling ab475c5 on SukkaW:ox-flamegraph into 584b093 on hexojs:master.

@SukkaW SukkaW force-pushed the SukkaW:ox-flamegraph branch 2 times, most recently from 7889bab to 3d515f2 Dec 23, 2019
@SukkaW

This comment has been minimized.

Copy link
Member Author

SukkaW commented Dec 23, 2019

@SukkaW SukkaW marked this pull request as ready for review Dec 23, 2019
@SukkaW SukkaW requested a review from YoshinoriN Dec 23, 2019
@SukkaW SukkaW force-pushed the SukkaW:ox-flamegraph branch from 3d515f2 to c0ca422 Dec 23, 2019
@curbengh

This comment has been minimized.

Copy link
Contributor

curbengh commented Dec 23, 2019

The flamegraph can help to identify bottleneck?

@SukkaW

This comment has been minimized.

Copy link
Member Author

SukkaW commented Dec 23, 2019

@curbengh

image

From flamegraph we can see there are three main bottleneck:

  • striptags from hexo-util.stripHTML
  • highlightjs, which we plan to bring up an alternative in Hexo 5.0.0
  • externalLinkFilter, which is still not fast enough.
@YoshinoriN

This comment has been minimized.

Copy link
Member

YoshinoriN commented Dec 24, 2019

I have a question about surge.
Should we delete old published documents from surge?

@SukkaW

This comment has been minimized.

Copy link
Member Author

SukkaW commented Dec 24, 2019

@YoshinoriN

https://surge.sh/pricing

It seems that Free plan already included unlimited publish.

@SukkaW SukkaW force-pushed the SukkaW:ox-flamegraph branch from c0ca422 to 42c2cb5 Jan 7, 2020
@jiangtj jiangtj mentioned this pull request Jan 12, 2020
7 of 15 tasks complete
@YoshinoriN

This comment has been minimized.

Copy link
Member

YoshinoriN commented Jan 15, 2020

@SukkaW
Sorry, so the late reply.
10 days ago, I asked the surge support team about this matter on their slack just in case.

Hello :)

Now we are considering to use surge.sh subdomain for publishing PullRequest benchmark.

#4000

As the surge free plan, we can publish unlimitedly. If we use this way, we will publish sites (300~400 sites per/month) with surge.sh subdomain and perhaps they will never delete.
Is this usage no-problem?

surge support team answer is no problem at all. :)
I will approve this PR after resolve the conflict.

@SukkaW

This comment has been minimized.

Copy link
Member Author

SukkaW commented Jan 16, 2020

@YoshinoriN I might login to surge.sh sometimes to remove some oldest deploys after all.

Copy link
Member

YoshinoriN left a comment

Anyway, I think we can merge this :)

@SukkaW SukkaW merged commit d3d2e7f into hexojs:master Jan 16, 2020
4 checks passed
4 checks passed
Travis CI - Pull Request Build Passed
Details
codeclimate All good!
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
coverage/coveralls Coverage remained the same at 97.701%
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.