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: add benchmarks jobs #266

Merged
merged 1 commit into from
Jul 24, 2020
Merged

ci: add benchmarks jobs #266

merged 1 commit into from
Jul 24, 2020

Conversation

dnlup
Copy link
Contributor

@dnlup dnlup commented Jul 24, 2020

Add benchmarks jobs in CI workflow. It was taken from #256 (comment) .

Did you have some customization in mind specific for undici?

TODO:

  • add CI job
  • add npm job

Fix #256

@dnlup dnlup marked this pull request as draft July 24, 2020 06:56
@dnlup dnlup marked this pull request as ready for review July 24, 2020 07:08
Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

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

lgtm

@ronag
Copy link
Member

ronag commented Jul 24, 2020

Nice! Though how does this work? I can see 2 more actions but how do one inspect the results?

@dnlup
Copy link
Contributor Author

dnlup commented Jul 24, 2020

The results are saved in 2 files, current.txt and branch.txt which are the benchmarks for the default (stable) branch and the working branch (the one where you're working on, being a PR or anything else), respectively. These files are uploaded as artifacts and you can download them for inspection.

image

@dnlup
Copy link
Contributor Author

dnlup commented Jul 24, 2020

We could also just use stdout if you prefer.

@ronag
Copy link
Member

ronag commented Jul 24, 2020

We could also just use stdout if you prefer.

I think that would be easier.

Add jobs in CI workflow to run benchmarks against the defautl branch.

They are taken from:

https://github.com/pinojs/pino/blob/v6.4.1/.github/workflows/bench.yml

Add `bench` npm script and install concurrently to run multiple
processes in the script.
@dnlup
Copy link
Contributor Author

dnlup commented Jul 24, 2020

Ok, so now the results are available in the job stdout. The only thing is that atm the bench on the default branch is failing because it's missing the script.

@ronag
Copy link
Member

ronag commented Jul 24, 2020

Awesome! Thanks.

@ronag ronag merged commit 84a1729 into nodejs:master Jul 24, 2020
@dnlup dnlup deleted the ci_bench branch July 24, 2020 13:13
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.

Benchmark CI Job
3 participants