summaryrefslogtreecommitdiff
path: root/perf
diff options
context:
space:
mode:
authorAlexander Early <alexander.early@gmail.com>2015-05-19 23:30:29 -0700
committerAlexander Early <alexander.early@gmail.com>2015-05-19 23:30:29 -0700
commit1b9200b16db246f660ee287b619e8edba3a19c0a (patch)
tree566b6c0fabdb31edd5a15c5d5d7f85aa130f9381 /perf
parent1f98d6a54dc8f74c582fa28f23893d2292cd7f81 (diff)
downloadasync-1b9200b16db246f660ee287b619e8edba3a19c0a.tar.gz
fixed path in benchmark script
Diffstat (limited to 'perf')
-rwxr-xr-xperf/benchmark.js24
1 files changed, 23 insertions, 1 deletions
diff --git a/perf/benchmark.js b/perf/benchmark.js
index 44dbc61..f31037b 100755
--- a/perf/benchmark.js
+++ b/perf/benchmark.js
@@ -1,9 +1,29 @@
#!/usr/bin/env node
+/**
+ * Compare the performance of any two tagged versions of async. Can also
+ * compare any tag with what is in the current working directory.
+ *
+ * Usage:
+ *
+ * perf/benchmark.js 0.9.2 0.9.0
+ *
+ * Compare version 0.9.0 with version 0.9.2
+ *
+ * perf/benchmark.js 0.6.0
+ *
+ * Compare version 0.6.0 with the current working version
+ *
+ * perf/benchmark.js
+ *
+ * Compare the current working version with the latest tagged version.
+ */
+
var Benchmark = require("benchmark");
var benchOptions = {defer: true, minSamples: 7};
var exec = require("child_process").exec;
var fs = require("fs");
+var path = require("path");
var mkdirp = require("mkdirp");
var async = require("../");
var suiteConfigs = require("./suites");
@@ -95,7 +115,9 @@ function cloneVersion(tag, callback) {
return callback();
}
- var cmd = "git clone --branch " + tag + " ../ " + versionDir;
+ var repoPath = path.join(__dirname, "..");
+
+ var cmd = "git clone --branch " + tag + " " + repoPath + " " + versionDir;
exec(cmd, function (err, stdout, stderr) {
if (err) {