From 523c405f0670ea839e73f661477c4c31b853b04e Mon Sep 17 00:00:00 2001 From: termie Date: Wed, 28 Sep 2011 19:49:40 -0500 Subject: [PATCH] add elapsed time to script --- stack.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/stack.sh b/stack.sh index c3bdc74..4daa95d 100755 --- a/stack.sh +++ b/stack.sh @@ -13,6 +13,9 @@ # Sanity Check # ============ +# Start our timer +START_TIME=`python -c "import time; print time.time()"` + # Warn users who aren't on natty, but allow them to override check and attempt # installation with ``FORCE=yes ./stack`` if ! grep -q natty /etc/lsb-release; then @@ -514,3 +517,11 @@ if [[ "$ENABLED_SERVICES" =~ "key" ]]; then echo "keystone is serving at http://$HOST_IP:5000/v2.0/" echo "examples on using novaclient command line is in exercise.sh" fi + +# Summary +# ======= + +# End our timer and give a timing summary +END_TIME=`python -c "import time; print time.time()"` +ELAPSED=`python -c "print $END_TIME - $START_TIME"` +echo "stack.sh completed in $ELAPSED seconds."