Skip to content

Commit 580d864

Browse files
committed
feat: add pinojs benchmark
1 parent e44a267 commit 580d864

File tree

4 files changed

+23
-1
lines changed

4 files changed

+23
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ packages operations.
1212
- [x] babel
1313
- [x] moment
1414
- [x] dotenv
15-
- [ ] pinojs
15+
- [x] pinojs
1616
- [ ] winston
1717
- [ ] helmet
1818
- [ ] node-sass

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"fastify": "4.26.1",
66
"lodash": "4.17.21",
77
"moment": "2.30.1",
8+
"pino": "8.19.0",
89
"piscina": "4.4.0",
910
"prettier": "3.2.5"
1011
},

pnpm-lock.yaml

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/pino-benchmark.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
const pino = require('pino');
2+
const logger = pino(pino.destination('/dev/null'));
3+
4+
module.exports = {
5+
name: 'pinojs',
6+
type: 'operation',
7+
operations: [
8+
{
9+
name: 'info (10x)',
10+
fn: () => {
11+
for (let i = 0; i < 10; ++i) {
12+
logger.info('hello world');
13+
}
14+
},
15+
},
16+
],
17+
benchmarker: 'benchmarkjs',
18+
};

0 commit comments

Comments
 (0)