You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
440 B

const Benchmark = require('benchmark')
const Signer = require('../signer')
const suite = new Benchmark.Suite()
const signer = Signer(['abcd', 'asdf', 'vadfa'])
const signedValue = signer.sign('test', 'vadfa')
suite
.add('sign', function () {
signer.sign('test')
})
.add('unsign', function () {
signer.unsign(signedValue)
})
.on('cycle', function (event) {
console.log(String(event.target))
})
.run({ delay: 0 })