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

Add benchmark runner #126

Merged
merged 1 commit into from Nov 12, 2016
Merged

Add benchmark runner #126

merged 1 commit into from Nov 12, 2016

Conversation

jsumners
Copy link
Member

I got tired of doing things the hard way so I added a benchmark runner. Results of the runner look like:

% npm run bench-basic

> pino@2.15.0 bench-basic /Users/jsumners/Projects/synced/pino
> node benchmarks/runbench basic

Running BASIC benchmark

benchBunyan*10000: 964.930ms
benchWinston*10000: 1883.062ms
benchBole*10000: 260.306ms
benchDebug*10000: 418.964ms
benchLogLevel*10000: 280.235ms
benchPino*10000: 243.147ms
benchPinoExreme*10000: 113.259ms
benchBunyan*10000: 919.606ms
benchWinston*10000: 1806.938ms
benchBole*10000: 234.044ms
benchDebug*10000: 387.009ms
benchLogLevel*10000: 255.417ms
benchPino*10000: 231.523ms
benchPinoExreme*10000: 108.729ms

==========
basic averages
Bunyan average: 942.268
Winston average: 1845
Bole average: 247.175
Debug average: 402.9865
LogLevel average: 267.826
Pino average: 237.33499999999998
PinoExreme average: 110.994
==========

The following scripts are added to package.json:

  • bench-all
  • bench-basic
  • bench-object
  • bench-deepobject
  • bench-multiarg
  • bench-child
  • bench-grandchild
  • bench-conception

@mcollina
Copy link
Member

whooaaa this is awesome! LGTM as it simplifies things

I was thinking of doing something similar, and dedicate some time reassessing the whole benchmarking framework. In particular, I would like to use http://npm.im/native-hdr-histogram in place of just time, so we can compute all the math properties easily.

@davidmarkclements
Copy link
Member

Yah this is good, I think it should be abstracted out as it's own thing, with (as Matteo says) percentile distribution

We can merge for now if you like, but don't be surprised if after a while I steal it and make it a module 😏

@mcollina
Copy link
Member

Feel free to merge James!

@jsumners
Copy link
Member Author

It's really tied to the output of fastbench. But if you want to make it generic, go for it @davidmarkclements.

@mcollina I don't know the procedure you use. Just use the GitHub "merge pull request" button and then push a commit with a version bump?

@mcollina
Copy link
Member

It's just tooling, we'll release it later on!

@jsumners jsumners merged commit 040437e into master Nov 12, 2016
@jsumners jsumners deleted the do-you-bench branch November 12, 2016 23:34
@github-actions
Copy link

github-actions bot commented Feb 9, 2022

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 9, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants