bench: sigops benchmarks.

This commit is contained in:
Christopher Jeffrey 2017-08-21 20:59:21 -07:00
parent 5468465e88
commit 9d74c837e8
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD

View File

@ -23,6 +23,18 @@ const tx10 = common.readTX('tx10');
end(10000);
}
{
const [tx, view] = tx5.getTX();
const end = bench('sigops');
let sigops = 0;
for (let i = 0; i < 100000; i++)
sigops += tx.getSigopsCost(view);
end(100000);
}
{
const [tx] = tx5.getTX();
const end = bench('serialize');