Skip to content

Commit 6f02eb9

Browse files
committed
Show build duration
1 parent c985dde commit 6f02eb9

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

bin/compile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ if [ -n "${BUILDPACK_VERBOSE+1}" ]; then
3131
set -x
3232
fi
3333

34+
# Save the start time to calculate execution time
35+
START=$(date +%s)
3436

3537
# Get the path to dir one above this file.
3638
BUILDPACK_DIR=$(cd -P -- "$(dirname -- "$0")" && cd .. && pwd -P)
@@ -237,3 +239,8 @@ if [ -n "${BUILDPACK_CLEAR_CACHE+1}" ]; then
237239
echo "-----> Clearing cache dir."
238240
rm -rf $METEOR_DIR
239241
fi
242+
243+
# Calculate execution time
244+
END=$(date +%s)
245+
DIFF=$(($END - $START))
246+
echo "-----> Build duration: $(date -d@$DIFF -u +%H:%M:%S)"

0 commit comments

Comments
 (0)