Browse code

add elapsed time to script

termie authored on 2011/09/29 09:49:40
Showing 1 changed files
... ...
@@ -13,6 +13,9 @@
13 13
 # Sanity Check
14 14
 # ============
15 15
 
16
+# Start our timer
17
+START_TIME=`python -c "import time; print time.time()"`
18
+
16 19
 # Warn users who aren't on natty, but allow them to override check and attempt
17 20
 # installation with ``FORCE=yes ./stack``
18 21
 if ! grep -q natty /etc/lsb-release; then
... ...
@@ -514,3 +517,11 @@ if [[ "$ENABLED_SERVICES" =~ "key" ]]; then
514 514
     echo "keystone is serving at http://$HOST_IP:5000/v2.0/"
515 515
     echo "examples on using novaclient command line is in exercise.sh"
516 516
 fi
517
+
518
+# Summary
519
+# =======
520
+
521
+# End our timer and give a timing summary
522
+END_TIME=`python -c "import time; print time.time()"`
523
+ELAPSED=`python -c "print $END_TIME - $START_TIME"`
524
+echo "stack.sh completed in $ELAPSED seconds."