summaryrefslogtreecommitdiff
path: root/benchmark
diff options
context:
space:
mode:
authorJoyee Cheung <joyeec9h3@gmail.com>2017-10-11 00:07:32 +0800
committerJoyee Cheung <joyeec9h3@gmail.com>2017-10-11 12:50:05 +0800
commit5dbd32c80c39739b52a124911ef342f4cc938bdf (patch)
tree88402e90b41c83335f983da1e9f552ac7df7bbc8 /benchmark
parent152bf22d02e6626a00444dd0c475f4457c006c44 (diff)
downloadandroid-node-v8-5dbd32c80c39739b52a124911ef342f4cc938bdf.tar.gz
android-node-v8-5dbd32c80c39739b52a124911ef342f4cc938bdf.tar.bz2
android-node-v8-5dbd32c80c39739b52a124911ef342f4cc938bdf.zip
benchmark: remove misc/v8-bench.js
These v8 benchmarks are oudated and have been replaced by Octane in the upstream. The benchmarking working group has already been benchmarking Octane, so this file can be removed now. PR-URL: https://github.com/nodejs/node/pull/16126 Ref: https://github.com/nodejs/node/issues/16119 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Michaƫl Zasso <targos@protonmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
Diffstat (limited to 'benchmark')
-rw-r--r--benchmark/misc/v8-bench.js56
1 files changed, 0 insertions, 56 deletions
diff --git a/benchmark/misc/v8-bench.js b/benchmark/misc/v8-bench.js
deleted file mode 100644
index fe004251cb..0000000000
--- a/benchmark/misc/v8-bench.js
+++ /dev/null
@@ -1,56 +0,0 @@
-// compare with "google-chrome deps/v8/benchmarks/run.html"
-'use strict';
-const fs = require('fs');
-const path = require('path');
-const vm = require('vm');
-const common = require('../common.js');
-
-const dir = path.join(__dirname, '..', '..', 'deps', 'v8', 'benchmarks');
-
-function load(filename, inGlobal) {
- var source = fs.readFileSync(path.join(dir, filename), 'utf8');
- if (!inGlobal) source = `(function () {${source}\n})()`;
- vm.runInThisContext(source, { filename: `v8/bechmark/${filename}` });
-}
-
-load('base.js', true);
-load('richards.js');
-load('deltablue.js');
-load('crypto.js');
-load('raytrace.js');
-load('earley-boyer.js');
-load('regexp.js');
-load('splay.js');
-load('navier-stokes.js');
-
-const benchmark_name = path.join('misc', 'v8-bench.js');
-const times = {};
-global.BenchmarkSuite.RunSuites({
- NotifyStart: function(name) {
- times[name] = process.hrtime();
- },
- NotifyResult: function(name, result) {
- const elapsed = process.hrtime(times[name]);
- common.sendResult({
- name: benchmark_name,
- conf: {
- benchmark: name
- },
- rate: result,
- time: elapsed[0] + elapsed[1] / 1e9
- });
- },
- NotifyError: function(name, error) {
- console.error(`${name}: ${error}`);
- },
- NotifyScore: function(score) {
- common.sendResult({
- name: benchmark_name,
- conf: {
- benchmark: `Score (version ${global.BenchmarkSuite.version})`
- },
- rate: score,
- time: 0
- });
- }
-});