2018-06-23 09:54:52 +00:00
|
|
|
const { Suite } = require('benchmark')
|
|
|
|
const badgen = require('..')
|
|
|
|
|
2018-07-01 06:53:52 +00:00
|
|
|
const shortParams = { subject: '1', status: '2' }
|
2018-06-23 09:59:12 +00:00
|
|
|
const longParams = { subject: 'build-build-build', status: 'passing-passing-passing' }
|
2018-07-01 06:53:52 +00:00
|
|
|
const fullParams = { subject: 'license', status: 'MIT', color: 'cyan' }
|
2018-06-23 09:59:12 +00:00
|
|
|
|
|
|
|
new Suite()
|
|
|
|
.add('generate by short params', () => badgen(shortParams))
|
|
|
|
.add('generate by long params ', () => badgen(longParams))
|
|
|
|
.add('generate by full params ', () => badgen(fullParams))
|
|
|
|
.on('cycle', event => console.log(String(event.target)))
|
|
|
|
.run()
|