pino
pino copied to clipboard
Time benchmarks and measuring
Hello! I wonder if there is an alternative to the standard console.time + console.timeEnd benchmarking in pino logger?
I expect something like this:
...
logger.time('benchmark1');
...
await reallySlowRequest();
...
logger.timeEnd('benchmark2');
Thanks a lot!
Unfortunately that's not implemented. We don't aim to be compatible with console.log - I think that API would be better suited to another module something like:
const pino = require('pino')()
const { time, timeEnd } = require('pino-time')(pino)
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.