未验证 提交 e625f884 编写于 作者: I iducn 提交者: GitHub

print build summary (#32110)

* print build summary

* print build summary

* print build summary

* print build summary
上级 a881b4d5
......@@ -404,7 +404,7 @@ EOF
tar -czf paddle_inference.tgz paddle_inference
buildSize=$(du -h --max-depth=0 ${PADDLE_ROOT}/build/paddle_inference.tgz |awk '{print $1}')
echo "Paddle_Inference Size: $buildSize"
echo "ipipe_log_param_Paddle_Inference_Size: $buildSize"
echo "ipipe_log_param_Paddle_Inference_Size: $buildSize" >> ${PADDLE_ROOT}/build/build_summary.txt
else
SYSTEM=`uname -s`
if [ "$SYSTEM" == "Darwin" ]; then
......@@ -414,10 +414,10 @@ EOF
fi
buildSize=$($com ${PADDLE_ROOT}/build |awk '{print $1}')
echo "Build Size: $buildSize"
echo "ipipe_log_param_Build_Size: $buildSize"
echo "ipipe_log_param_Build_Size: $buildSize" >> ${PADDLE_ROOT}/build/build_summary.txt
PR_whlSize=$($com ${PADDLE_ROOT}/build/python/dist |awk '{print $1}')
echo "PR whl Size: $PR_whlSize"
echo "ipipe_log_param_PR_whl_Size: $PR_whlSize"
echo "ipipe_log_param_PR_whl_Size: $PR_whlSize" >> ${PADDLE_ROOT}/build/build_summary.txt
fi
}
......@@ -442,7 +442,7 @@ function cmake_gen_and_build() {
build $2
endTime_s=`date +%s`
echo "Build Time: $[ $endTime_s - $startTime_s ]s"
echo "ipipe_log_param_Build_Time: $[ $endTime_s - $startTime_s ]s"
echo "ipipe_log_param_Build_Time: $[ $endTime_s - $startTime_s ]s" >> ${PADDLE_ROOT}/build/build_summary.txt
}
function build_mac() {
......@@ -480,7 +480,7 @@ function cmake_gen_and_build_mac() {
build_mac
endTime_s=`date +%s`
echo "Build Time: $[ $endTime_s - $startTime_s ]s"
echo "ipipe_log_param_Build_Time: $[ $endTime_s - $startTime_s ]s"
echo "ipipe_log_param_Build_Time: $[ $endTime_s - $startTime_s ]s" >> ${PADDLE_ROOT}/build/build_summary.txt
}
function run_test() {
......@@ -684,7 +684,7 @@ EOF
#mactest_error=$?
ut_endTime_s=`date +%s`
echo "Mac testCase Time: $[ $ut_endTime_s - $ut_startTime_s ]s"
echo "ipipe_log_param_Mac_TestCases_Time: $[ $ut_endTime_s - $ut_startTime_s ]s"
echo "ipipe_log_param_Mac_TestCases_Time: $[ $ut_endTime_s - $ut_startTime_s ]s" >> ${PADDLE_ROOT}/build/build_summary.txt
paddle version
# Recovery proxy to avoid failure in later steps
set +x
......@@ -993,10 +993,10 @@ EOF
num=$(echo $testcases|grep -o '\^'|wc -l)
if (( $2 == -1 )); then
echo "exclusive TestCases count is $num"
echo "ipipe_log_param_Exclusive_TestCases_Count: $num"
echo "ipipe_log_param_Exclusive_TestCases_Count: $num" >> ${PADDLE_ROOT}/build/build_summary.txt
else
echo "$2 card TestCases count is $num"
echo "ipipe_log_param_${2}_Cards_TestCases_Count: $num"
echo "ipipe_log_param_${2}_Cards_TestCases_Count: $num" >> ${PADDLE_ROOT}/build/build_summary.txt
fi
}
......@@ -1098,10 +1098,10 @@ function card_test() {
ut_endTime_s=`date +%s`
if (( $2 == -1 )); then
echo "exclusive TestCases Total Time: $[ $ut_endTime_s - $ut_startTime_s ]s"
echo "ipipe_log_param_Exclusive_TestCases_Total_Time: $[ $ut_endTime_s - $ut_startTime_s ]s"
echo "ipipe_log_param_Exclusive_TestCases_Total_Time: $[ $ut_endTime_s - $ut_startTime_s ]s" >> ${PADDLE_ROOT}/build/build_summary.txt
else
echo "$2 card TestCases Total Time: $[ $ut_endTime_s - $ut_startTime_s ]s"
echo "ipipe_log_param_${2}_Cards_TestCases_Total_Time: $[ $ut_endTime_s - $ut_startTime_s ]s"
echo "ipipe_log_param_${2}_Cards_TestCases_Total_Time: $[ $ut_endTime_s - $ut_startTime_s ]s" >> ${PADDLE_ROOT}/build/build_summary.txt
fi
set +m
}
......@@ -1448,7 +1448,7 @@ function parallel_test() {
fi
ut_total_endTime_s=`date +%s`
echo "TestCases Total Time: $[ $ut_total_endTime_s - $ut_total_startTime_s ]s"
echo "ipipe_log_param_TestCases_Total_Time: $[ $ut_total_endTime_s - $ut_total_startTime_s ]s"
echo "ipipe_log_param_TestCases_Total_Time: $[ $ut_total_endTime_s - $ut_total_startTime_s ]s" >> ${PADDLE_ROOT}/build/build_summary.txt
}
function enable_unused_var_check() {
......@@ -1728,7 +1728,7 @@ EOF
fi
endTime_s=`date +%s`
echo "Build Time: $[ $endTime_s - $startTime_s ]s"
echo "ipipe_log_param_Build_Time: $[ $endTime_s - $startTime_s ]s"
echo "ipipe_log_param_Build_Time: $[ $endTime_s - $startTime_s ]s" >> ${PADDLE_ROOT}/build/build_summary.txt
build_size "paddle_inference"
}
......@@ -1760,7 +1760,7 @@ EOF
EXIT_CODE=$?
fluid_endTime_s=`date +%s`
echo "test_fluid_lib Total Time: $[ $fluid_endTime_s - $fluid_startTime_s ]s"
echo "ipipe_log_param_Test_Fluid_Lib_Total_Time: $[ $fluid_endTime_s - $fluid_startTime_s ]s"
echo "ipipe_log_param_Test_Fluid_Lib_Total_Time: $[ $fluid_endTime_s - $fluid_startTime_s ]s" >> ${PADDLE_ROOT}/build/build_summary.txt
./clean.sh
if [[ "$EXIT_CODE" != "0" ]]; then
exit 8;
......@@ -1807,7 +1807,7 @@ function example() {
function collect_ccache_hits() {
rate=$(ccache -s | grep 'cache hit rate' | awk '{print $4}')
echo "ccache hit rate: ${rate}%"
echo "ipipe_log_param_Ccache_Hit_Rate: ${rate}%"
echo "ipipe_log_param_Ccache_Hit_Rate: ${rate}%" >> ${PADDLE_ROOT}/build/build_summary.txt
}
......@@ -2029,6 +2029,12 @@ function main() {
exit 1
;;
esac
set +x
if [[ -f ${PADDLE_ROOT}/build/build_summary.txt ]];then
echo "=====================build summary======================"
cat ${PADDLE_ROOT}/build/build_summary.txt
echo "========================================================"
fi
echo "paddle_build script finished as expected"
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册