Skip to content

Commit

Permalink
馃弴 Add a simple performance benchmark to track progress
Browse files Browse the repository at this point in the history
  • Loading branch information
canterberry committed May 2, 2019
1 parent 065e328 commit 9e72d02
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
7 changes: 7 additions & 0 deletions benchmark/index.js
@@ -0,0 +1,7 @@
const { Keccak } = require('../lib');

for (let i = 0; i < 10000; i++) {
const keccak = new Keccak(256);
keccak.update('Hello, world!');
keccak.digest();
}
1 change: 1 addition & 0 deletions package.json
Expand Up @@ -26,6 +26,7 @@
},
"scripts": {
"build": "babel --only '**/index.js' --no-comments --compact true --minified --source-maps false --out-dir lib src; cp -vfR README.md LICENSE package.json yarn.lock index.d.ts lib/",
"benchmark": "node benchmark",
"coverage": "nyc report",
"lint": "eslint src test",
"test": "nyc --silent --check-coverage --lines 100 --per-file mocha --require @babel/register --recursive test"
Expand Down

0 comments on commit 9e72d02

Please sign in to comment.