Skip to content

Commit e86484d

Browse files
committed
Added basic timing around the ghe-restore process
1 parent b40475a commit e86484d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

bin/ghe-restore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,8 @@ if $instance_configured && ! $force; then
174174
fi
175175

176176
# Log restore start message locally and in /var/log/syslog on remote instance
177+
START_TIME=$(date +%s)
178+
echo 'Start time:' $START_TIME
177179
echo "Starting restore of $GHE_HOSTNAME with backup-utils v$BACKUP_UTILS_VERSION from snapshot $GHE_RESTORE_SNAPSHOT"
178180
ghe_remote_logger "Starting restore from $(hostname) with backup-utils v$BACKUP_UTILS_VERSION / snapshot $GHE_RESTORE_SNAPSHOT ..."
179181

@@ -400,6 +402,10 @@ else
400402
ghe-ssh "$GHE_HOSTNAME" -- /bin/sh 1>&3
401403
fi
402404

405+
END_TIME=$(date +%s)
406+
echo 'End time:' $END_TIME
407+
echo 'Runtime:' $(($END_TIME - $START_TIME)) 'seconds'
408+
403409
echo "Restore of $GHE_HOSTNAME from snapshot $GHE_RESTORE_SNAPSHOT finished."
404410

405411
if ! $instance_configured; then

0 commit comments

Comments
 (0)