mirror of
https://github.com/nodejs/node.git
synced 2026-11-09 15:11:11 -05:00
Add script for running V8 benchmarks
This commit is contained in:
1 parent
b11d78b386
commit
bd094103d7
1 file changed
+15
@@ -0,0 +1,15 @@
|
||||
// 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 = console.log;
|
||||
|
||||
global.load = function (x) {
|
||||
var source = fs.readFileSync(path.join(dir, x), 'utf8');
|
||||
vm.runInThisContext(source, x);
|
||||
}
|
||||
|
||||
load('run.js');
|
||||
Reference in new issue
Block a user