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.

18 lines
411 B

const Benchmark = require('benchmark')
const Signer = require('../signer')
const suite = new Benchmark.Suite()
const signer = Signer('abcd')
const signedValue = signer.sign('test')
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 })