Skip to content

Commit

Permalink
add benchmarks
Browse files Browse the repository at this point in the history
  • Loading branch information
tj committed Sep 17, 2013
1 parent 3e97c84 commit 6b53798
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
node_modules
.DS_Store
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,8 @@ test:
--require should \
--reporter spec

.PHONY: test
bench:
@./node_modules/.bin/matcha \
bench/index.js

.PHONY: test bench
10 changes: 10 additions & 0 deletions bench/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

var exif = require('..');
var fs = require('fs');
var buf = fs.readFileSync('test/fixtures/forest.jpeg');

suite('exif()', function(){
bench('file', function(next){
exif('test/fixtures/image.jpg', next);
})
})
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
},
"devDependencies": {
"mocha": "*",
"better-assert": "*"
"better-assert": "*",
"matcha": "~0.3.0"
},
"main": "index"
}

0 comments on commit 6b53798

Please sign in to comment.