Skip to content

Commit bf0eb44

Browse files
committed
change: print build execution time
1 parent dd5b81b commit bf0eb44

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

buildspec.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,18 @@ phases:
2323
- AWS_ACCESS_KEY_ID= AWS_SECRET_ACCESS_KEY= AWS_SESSION_TOKEN=
2424
AWS_CONTAINER_CREDENTIALS_RELATIVE_URI= AWS_DEFAULT_REGION=
2525
tox -e py36,py27 --parallel all -- tests/unit
26-
- ./ci-scripts/displaytime.sh 'py36,py27 unit ' $start_time
26+
- ./ci-scripts/displaytime.sh 'py36,py27 unit' $start_time
2727

2828
# local mode tests
2929
- |
3030
if has-matching-changes "tests/" "src/*.py" "setup.py" "setup.cfg" "buildspec.yml"; then
3131
start_time=`date +%s`
3232
IGNORE_COVERAGE=- tox -e py36 -- tests/integ -m local_mode --durations 50
33-
./ci-scripts/displaytime.sh 'py36 local mode ' $start_time
33+
./ci-scripts/displaytime.sh 'py36 local mode' $start_time
3434
3535
start_time=`date +%s`
3636
IGNORE_COVERAGE=- tox -e py27 -- tests/integ -m local_mode --durations 50
37-
./ci-scripts/displaytime.sh 'py27 local mode ' $start_time
37+
./ci-scripts/displaytime.sh 'py27 local mode' $start_time
3838
3939
else
4040
echo "skipping integration tests"
@@ -45,15 +45,15 @@ phases:
4545
if has-matching-changes "tests/" "src/*.py" "setup.py" "setup.cfg" "buildspec.yml"; then
4646
start_time=`date +%s`
4747
python3 -u ci-scripts/queue_build.py
48-
./ci-scripts/displaytime.sh 'Build queue' $start_time
48+
./ci-scripts/displaytime.sh 'build queue' $start_time
4949
5050
start_time=`date +%s`
5151
IGNORE_COVERAGE=- tox -e py36 -- tests/integ -m "not local_mode" -n 48 --reruns 3 --reruns-delay 5 --durations 50
52-
./ci-scripts/displaytime.sh 'py36 tests/integ ' $start_time
52+
./ci-scripts/displaytime.sh 'py36 tests/integ' $start_time
5353
5454
start_time=`date +%s`
5555
IGNORE_COVERAGE=- tox -e py27 -- tests/integ -m "not local_mode" -n 48 --reruns 3 --reruns-delay 5 --durations 50
56-
./ci-scripts/displaytime.sh 'py27 tests/integ ' $start_time
56+
./ci-scripts/displaytime.sh 'py27 tests/integ' $start_time
5757
5858
else
5959
echo "skipping integration tests"
@@ -65,7 +65,7 @@ phases:
6565
echo "running notebook test"
6666
start_time=`date +%s`
6767
./tests/scripts/run-notebook-test.sh
68-
./ci-scripts/displaytime.sh 'notebook test ' $start_time
68+
./ci-scripts/displaytime.sh 'notebook test' $start_time
6969
7070
else
7171
echo "skipping notebook test"

ci-scripts/displaytime.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
set -euo pipefail
1616

17-
printf '%s execution time ' $1
17+
printf '\n=================== %s execution time ===================\n\n ' $1
1818

1919
start_time=$2
2020
end_time=`date +%s`
@@ -26,4 +26,4 @@ secs=$((total_time%60))
2626
(( $hours > 0 )) && printf '%d hours ' $hours
2727
(( $minutes > 0 )) && printf '%d minutes ' $minutes
2828
(( $hours > 0 || $minutes > 0 )) && printf 'and '
29-
printf '%d seconds\n' $secs
29+
printf '%d seconds\n\n' $secs

0 commit comments

Comments
 (0)