diff --git a/scripts/benchmarks/initial-start-time.sh b/scripts/benchmarks/initial-start-time.sh index 215c375883..0969b65f0a 100755 --- a/scripts/benchmarks/initial-start-time.sh +++ b/scripts/benchmarks/initial-start-time.sh @@ -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