mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-01-29 06:27:49 +00:00
Rename /benchmark to /perf.
Former-commit-id: 3688f3aeaf1e7d290d863cdba0d2277afcffa2e8
This commit is contained in:
@@ -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
|
||||
@@ -2,7 +2,7 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Lo-Dash Benchmark Suite</title>
|
||||
<title>Lo-Dash Performance Suite</title>
|
||||
<style>
|
||||
html, body {
|
||||
margin: 0;
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
document.getElementById('FirebugUI').style.height = '100%';
|
||||
|
||||
script.src = 'benchmark.js';
|
||||
script.src = 'perf.js';
|
||||
sibling.parentNode.insertBefore(script, sibling);
|
||||
};
|
||||
</script>
|
||||
@@ -88,9 +88,9 @@
|
||||
else {
|
||||
// report results
|
||||
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 {
|
||||
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
7
perf/run-perf.sh
Executable 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
|
||||
Reference in New Issue
Block a user