It's useful to know how XCI performs in terms of duration time so
use the bash $SECONDS variable to calculate the total amount of time
it takes for a full XCI deployment. Moreover, use the 'ts' command to
print a timestamp for every command executed. This will help developers
identify tasks which take a lot of time to complete and possibly
optimize them.
Change-Id: I75a8cb8c05957bb205e63210d6cafaf54d989f32
Signed-off-by: Markos Chandras <mchandras@suse.de>
#!/bin/bash
export XCI_FLAVOR=mini
cd ~/releng-xci/xci
-./xci-deploy.sh
+./xci-deploy.sh | ts
EOF
# Copy again
do_copy
echo "-----------------------------------------------------------------------"
source ${XCI_PATH}/xci/installer/${XCI_INSTALLER}/deploy.sh
+# Deployment time
+xci_deploy_time=$SECONDS
+echo "-------------------------------------------------------------------------------------------------------------"
+echo "Info: xci_deploy.sh deployment took $(($xci_deploy_time / 60)) minutes and $(($xci_deploy_time % 60)) seconds"
+echo "-------------------------------------------------------------------------------------------------------------"
+
# vim: set ts=4 sw=4 expandtab: