Permalink
Browse files

Use js for benchmark cleanup

Fix #199
  • Loading branch information...
1 parent 957fd93 commit f96190b24d6912b02a716380ed7f2b2e8a87ac04 @isaacs committed Jul 2, 2015
Showing with 8 additions and 6 deletions.
  1. +6 −0 benchclean.js
  2. +0 −4 benchclean.sh
  3. +1 −1 package.json
  4. +1 −1 prof.sh
View
@@ -0,0 +1,6 @@
+var rimraf = require('rimraf')
+var bf = (process.env.TMPDIR || '/tmp') + '/benchmark-fixture'
+rimraf('{' + [bf, 'v8.log', 'profile.txt'].join(',') + '}', function (er) {
+ if (er)
+ throw er
+})
View
@@ -1,4 +0,0 @@
-#!/bin/bash
-
-tmp=${TMPDIR:-/tmp}
-rm -rf $tmp/benchmark-fixture v8.log profile.txt
View
@@ -36,7 +36,7 @@
"test-regen": "npm run profclean && TEST_REGEN=1 node test/00-setup.js",
"bench": "bash benchmark.sh",
"prof": "bash prof.sh && cat profile.txt",
- "benchclean": "bash benchclean.sh"
+ "benchclean": "node benchclean.js"
},
"license": "ISC"
}
View
@@ -14,6 +14,6 @@ node --prof -e '
})
//console.log(glob.sync("**/*.txt").length);
' "$wd"
-mv v8.log "$wd"
+mv *v8.log "$wd/v8.log"
cd "$wd"
node-tick-processor > profile.txt

0 comments on commit f96190b

Please sign in to comment.