Remove java scaffolding from benchmarks.

This commit is contained in:
John-David Dalton
2015-11-27 16:20:16 -06:00
parent 39dae19974
commit 68c0eb5216
2 changed files with 14 additions and 32 deletions

View File

@@ -9,10 +9,6 @@
padding: 0;
height: 100%;
}
applet {
position: absolute;
left: -9999em;
}
#FirebugUI {
top: 2em;
}
@@ -66,15 +62,6 @@
setTimeout(run, 15);
}
// is the applet permitted?
if (!/[?&]nojava=true(?:&|$)/.test(location.search)) {
// is the applet really needed?
while (!(measured = new Date - begin)) {}
if (measured > 1 && !((perfNow = window.performance) && typeof (perfNow.now || perfNow.webkitNow) == 'function')) {
// load applet
document.write('<applet code="nano" archive="../vendor/benchmark.js/nano.jar"></applet>');
}
}
window.onload = init;
}());
</script>

View File

@@ -88,13 +88,10 @@
/** Detect if in a browser environment. */
var isBrowser = isHostType(root, 'document') && isHostType(root, 'navigator');
/** Detect if in a Java environment. */
var isJava = !isBrowser && /Java/.test(toString.call(root.java));
/** Use a single "load" function. */
var load = (typeof require == 'function' && !amd)
? require
: (isJava && root.load) || noop;
: noop;
/** Load lodash. */
var lodash = root.lodash || (root.lodash = (
@@ -205,7 +202,7 @@
fbPanel.getElementById('fbPanel1');
log('\nSit back and relax, this may take a while.');
suites[0].run({ 'async': !isJava });
suites[0].run({ 'async': true });
}
/*--------------------------------------------------------------------------*/
@@ -258,7 +255,7 @@
if (suites.length) {
// Run next suite.
suites[0].run({ 'async': !isJava });
suites[0].run({ 'async': true });
}
else {
var aMeanHz = getGeometricMean(score.a),
@@ -981,7 +978,6 @@
);
// Avoid Underscore induced `OutOfMemoryError` in Rhino and Ringo.
if (!isJava) {
suites.push(
Benchmark.Suite('`_.find` with `_.matches` shorthand')
.add(buildName, {
@@ -993,7 +989,6 @@
'teardown': 'function matches(){}'
})
);
}
/*--------------------------------------------------------------------------*/