mirror of
https://github.com/meteor/meteor.git
synced 2026-01-09 23:58:19 -05:00
Run benchmark 10 times
This commit is contained in:
@@ -9,7 +9,7 @@ checkout_dir=$(pwd)
|
||||
app_dir=`mktemp -d /tmp/meteor-bench-app.XXXX`
|
||||
|
||||
cd $app_dir
|
||||
$checkout_dir/meteor create --example todos . &> /dev/null
|
||||
$checkout_dir/meteor create --example todos . > /dev/null
|
||||
|
||||
# Add a file to the app that shuts it down immediately
|
||||
echo "Meteor.startup(function(){process.exit(0)});" > "exit.js"
|
||||
@@ -17,18 +17,20 @@ echo "Meteor.startup(function(){process.exit(0)});" > "exit.js"
|
||||
# Run once to build all of the packages
|
||||
$checkout_dir/meteor --once &> /dev/null
|
||||
|
||||
# Run again to time
|
||||
/usr/bin/time -p $checkout_dir/meteor --once 1> /dev/null 2> out
|
||||
for i in `seq 10`; do
|
||||
# Run again to time
|
||||
/usr/bin/time -p $checkout_dir/meteor --once 1> /dev/null 2> out
|
||||
|
||||
BENCHMARK_OUTPUT=`cat out`
|
||||
BENCHMARK_OUTPUT=`cat out`
|
||||
|
||||
# Get first line
|
||||
BENCHMARK_OUTPUT=$(echo "$BENCHMARK_OUTPUT" | head -n 1)
|
||||
ARRAY=($BENCHMARK_OUTPUT)
|
||||
NUMBER=${ARRAY[1]}
|
||||
# Get first line
|
||||
BENCHMARK_OUTPUT=$(echo "$BENCHMARK_OUTPUT" | head -n 1)
|
||||
ARRAY=($BENCHMARK_OUTPUT)
|
||||
NUMBER=${ARRAY[1]}
|
||||
|
||||
# Print output
|
||||
echo $NUMBER
|
||||
# Print output
|
||||
echo $NUMBER
|
||||
done
|
||||
|
||||
cd $checkout_dir
|
||||
|
||||
|
||||
Reference in New Issue
Block a user