未验证 提交 a06feb93 编写于 作者: R risemeup1 提交者: GitHub

fix ccache print information (#56076)

* fix ccache print information

* fix ccache print information

* fix ccache print information

* fix ccache print information

* fix ccache print information
上级 9f04f2ac
......@@ -3149,8 +3149,17 @@ function exec_samplecode_test() {
function collect_ccache_hits() {
rate=$(ccache -s | grep 'cache hit rate' | awk '{print $4}')
echo "ccache hit rate: ${rate}%"
ccache -s
ccache_version=$(ccache -V | grep "ccache version" | awk '{print $3}')
echo "$ccache_version"
if [[ $ccache_version == 4* ]] ; then
rate=$(ccache -s | grep "Hits" | awk 'NR==1 {print $5}' | cut -d '(' -f2 | cut -d ')' -f1)
echo "ccache hit rate: ${rate}%"
else
rate=$(ccache -s | grep 'cache hit rate' | awk '{print $4}')
echo "ccache hit rate: ${rate}"
fi
echo "ipipe_log_param_Ccache_Hit_Rate: ${rate}%" >> ${PADDLE_ROOT}/build/build_summary.txt
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册