benmark
A library to help with benchmarking.
Configuration
config/default.js
const logger = require('winston')
require('winston-daily-rotate-file')
logger.add(logger.transports.DailyRotateFile, {
dirname: './logs',
filename: 'xpub-epmc.log',
datePattern: 'YYYY-MM-DD',
zippedArchive: true,
maxFiles: '30d',
})
module.exports = {
benmark: { logger }
};
Usage
Currently it has the following functionalities:
- timer: help track how long a function takes
See tests/index.test.js for the usage.