summaryrefslogtreecommitdiff
path: root/benchmark/misc
diff options
context:
space:
mode:
authorisaacs <i@izs.me>2013-02-11 23:10:12 -0800
committerisaacs <i@izs.me>2013-02-19 14:14:35 -0800
commit844b33205c77fe32d2aae76209eb444044b9aeff (patch)
tree1f62abfd5349120435aff3ca0d25c47d960d2407 /benchmark/misc
parent2a2942bd7f39f687e61188fc593ab9d23ceff1c8 (diff)
downloadnode-844b33205c77fe32d2aae76209eb444044b9aeff.tar.gz
bench: Move v8_bench into misc
Diffstat (limited to 'benchmark/misc')
-rw-r--r--benchmark/misc/v8_bench.js18
1 files changed, 18 insertions, 0 deletions
diff --git a/benchmark/misc/v8_bench.js b/benchmark/misc/v8_bench.js
new file mode 100644
index 000000000..8bf49f3f6
--- /dev/null
+++ b/benchmark/misc/v8_bench.js
@@ -0,0 +1,18 @@
+// compare with "google-chrome deps/v8/benchmarks/run.html"
+var fs = require('fs');
+var path = require('path');
+var vm = require('vm');
+
+var dir = path.join(__dirname, '..', '..', 'deps', 'v8', 'benchmarks');
+
+global.print = function(s) {
+ if (s === '----') return;
+ console.log('misc/v8_bench.js %s', s);
+};
+
+global.load = function (x) {
+ var source = fs.readFileSync(path.join(dir, x), 'utf8');
+ vm.runInThisContext(source, x);
+}
+
+load('run.js');