Rename /benchmark to /perf.

Former-commit-id: 3688f3aeaf1e7d290d863cdba0d2277afcffa2e8
This commit is contained in:
John-David Dalton
2012-05-20 04:25:19 -04:00
parent c2a1f50dc0
commit 5204fac055
4 changed files with 11 additions and 11 deletions

View File

@@ -1,7 +0,0 @@
cd "$(dirname "$0")"
for cmd in rhino ringo narwhal node; do
echo "Benchmarking in $cmd..."
$cmd benchmark.js
done
echo "Benchmarking in a browser..."
open index.html

View File

@@ -2,7 +2,7 @@
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<title>Lo-Dash Benchmark Suite</title> <title>Lo-Dash Performance Suite</title>
<style> <style>
html, body { html, body {
margin: 0; margin: 0;
@@ -26,7 +26,7 @@
document.getElementById('FirebugUI').style.height = '100%'; document.getElementById('FirebugUI').style.height = '100%';
script.src = 'benchmark.js'; script.src = 'perf.js';
sibling.parentNode.insertBefore(script, sibling); sibling.parentNode.insertBefore(script, sibling);
}; };
</script> </script>

View File

@@ -88,9 +88,9 @@
else { else {
// report results // report results
if (score.lodash >= score.underscore) { if (score.lodash >= score.underscore) {
console.log('\nLo-Dash is ' + (score.lodash / score.underscore).toFixed(2) + 'x faster than Underscore.'); console.log('\nLo-Dash is ' + (score.lodash / score.underscore).toFixed(2) + 'x faster than Underscore.\n');
} else { } else {
console.log('\nUnderscore is ' + (score.underscore / score.lodash).toFixed(2) + 'x faster than Lo-Dash.'); console.log('\nUnderscore is ' + (score.underscore / score.lodash).toFixed(2) + 'x faster than Lo-Dash.\n');
} }
} }
} }

7
perf/run-perf.sh Executable file
View File

@@ -0,0 +1,7 @@
cd "$(dirname "$0")"
for cmd in rhino ringo narwhal node; do
echo "Running performance suite in $cmd..."
$cmd perf.js
done
echo "\nRunning performance suite in a browser..."
open index.html