TomFrost / Bristol

Insanely configurable logging for Node.js
MIT License
113 stars 19 forks source link

WIP: Benchmarks of formatters #36

Open rooftopsparrow opened 7 years ago

rooftopsparrow commented 7 years ago

Here's a very crude and probably incorrect benchmark test for the json formatter.

$ npm run bench

> bristol@0.3.3 bench ~/Bristol
> node -r ./test/setup.js ./test/bench/formatters/json.js

json formatter x 62,879 ops/sec ±0.94% (89 runs sampled)

I want to add benchmarks to all the formatters and get a baseline of performance for issue #35 to compare the slowdown of doing a safer "stringifying" of messages.