-
Notifications
You must be signed in to change notification settings - Fork 845
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
+10-20% child creation, +7-8% basic/child logging, JSON output fix, sub-child loggers #21
Conversation
👍 to be released as 2.0.0. |
The example and the README needs fixing, because it won't work anymore. |
good point d27d9c5 |
70674c6
to
d27d9c5
Compare
Awesome. LGTM and release as 2.0.0 |
just made a slight alteration, it doesn't come with any perf hit so we're good the alteration is to make sure that the bindings of childs child are added to the json output after the parent, not before. This can be important in the case of a key clash between parent and child, particularly if we want pino to work as a drop in replacement for bunyan for example, prior to the change in f8e7e09, we'd have this situation
When you {"pid":95469,"hostname":"MacBook-Pro-3.home","level":30,"msg":"howdy","time":1459533782032,"a":"property","a":"prop","v":1} So a |
Nice!
|
b33d805
to
2f0c9bf
Compare
squashed into single v2 commit, once ci checks have passed, I'll merge and then publish |
v2.0.0 published |
Awesome. Thank you again. |
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. |
fixes #20
closes #19
Summary:
child creation shows speed improvements of between 10%-20%:
benchmarks/childCreation.js - old
benchPinoCreation_10000: 417ms
benchBunyanCreation_10000: 1345ms
benchBoleCreation_10000: 1584ms
benchPinoCreation_10000: 384ms
benchBunyanCreation_10000: 1277ms
benchBoleCreation_10000: 1572ms
benchmarks/childCreation.js - new
benchPinoCreation_10000: 362ms
benchBunyanCreation_10000: 1291ms
benchBoleCreation_10000: 1547ms
benchPinoCreation_10000: 338ms
benchBunyanCreation_10000: 1275ms
benchBoleCreation_10000: 1527ms
child logging benchmarks consistently showed a 7% speed up (basic benchmarks show this also)
benchmarks/child.js - old
benchBunyanObj_10000: 1254ms
benchPinoChild_10000: 353ms
benchBoleChild_10000: 1484ms
benchBunyanObj_10000: 1207ms
benchPinoChild_10000: 339ms
benchBoleChild_10000: 1460ms
benchmarks/child.js - new
benchBunyanObj_10000: 1260ms
benchPinoChild_10000: 329ms
benchBoleChild_10000: 1498ms
benchBunyanObj_10000: 1216ms
benchPinoChild_10000: 316ms
benchBoleChild_10000: 1473ms
sub-child loggers zero overhead
(also tested with children of children of children, same, no perceivable impact)
benchmarks/child-child.js
benchBunyanChildChild_10000: 1358ms
benchPinoChildChild_10000: 326ms
benchBunyanChildChild_10000: 1314ms
benchPinoChildChild_10000: 317ms
basic benchmarks consistently show a 7-8% speed up
benchmarks/basic.js - old
benchBunyan_10000: 1060ms
benchWinston_10000: 1825ms
benchBole_10000: 1642ms
benchPino_10000: 286ms
benchBunyan_10000: 1061ms
benchWinston_10000: 1718ms
benchBole_10000: 1590ms
benchPino_10000: 287ms
benchmarks/basic.js - new
benchBunyan_10000: 1192ms
benchWinston_10000: 1909ms
benchBole_10000: 1547ms
benchPino_10000: 264ms
benchBunyan_10000: 1085ms
benchWinston_10000: 1793ms
benchBole_10000: 1508ms
benchPino_10000: 260ms
object benchmarks roughly the same
multiple runs showed some differences but not conclusive enough to call it
multi arg benchmarks are about the same
express-pino-logger raw server benchmark 15% speed increase:
old
New