From 5d55ebdefe7950a8b719474b5422b9b614e6d9c0 Mon Sep 17 00:00:00 2001 From: Leo Chen Date: Wed, 11 May 2022 14:14:36 +0800 Subject: [PATCH] print start time, end time for each compilation command (#42647) * print start time, end time for each compilation command * add process info --- tools/get_build_time.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/get_build_time.sh b/tools/get_build_time.sh index a89c024f97e..1563fefff37 100755 --- a/tools/get_build_time.sh +++ b/tools/get_build_time.sh @@ -15,4 +15,8 @@ # limitations under the License. CUR_ROOT=$(dirname "$0")/.. -/usr/bin/time -f '%C, %E elapsed, %U user, %S sys' "$@" >> $CUR_ROOT/build/build-time 2>&1 +start=$(date +%s.%N) +duration=$("/usr/bin/time" -f "%C, %E elapsed, %U user, %S sys" "$@" 2>&1) +end=$(date +%s.%N) + +echo ${duration}, 'start', $start, 'end', $end, 'process', $$ >> $CUR_ROOT/build/build-time -- GitLab