[skip e2e] Add time caculate for cpp ut && go ut (#20552)

Signed-off-by: Jenny Li <jing.li@zilliz.com>

Signed-off-by: Jenny Li <jing.li@zilliz.com>
pull/20570/head
Jenny Li 2022-11-14 14:43:06 +08:00 committed by GitHub
parent af66a0b621
commit 44aed995ae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 0 deletions

View File

@ -57,6 +57,8 @@ if [ $? -ne 0 ]; then
echo "Failed to generate coverage baseline"
exit -1
fi
# starting the timer
beginTime=`date +%s`
# run unittest
for test in `ls ${MILVUS_CORE_UNITTEST_DIR}`; do
@ -91,3 +93,6 @@ ${LCOV_GEN_CMD} ${FILE_INFO_OUTPUT} --output-directory ${DIR_LCOV_OUTPUT}/
echo "Generate cpp code coverage report to ${DIR_LCOV_OUTPUT}"
endTime=`date +%s`
echo "Total time for cpp unittest:" $(($endTime-$beginTime)) "s"

View File

@ -27,6 +27,9 @@ source $BASEDIR/setenv.sh
# run unittest
echo "Running unittest under ./internal"
# starting the timer
beginTime=`date +%s`
if [[ $(uname -s) == "Darwin" && "$(uname -m)" == "arm64" ]]; then
APPLE_SILICON_FLAG="-tags dynamic"
fi
@ -37,6 +40,9 @@ for d in $(go list ./internal/... | grep -v -e vendor -e kafka -e planparserv2/g
rm profile.out
fi
done
endTime=`date +%s`
echo "Total time for go unittest:" $(($endTime-$beginTime)) "s"
# generate html report
go tool cover -html=./${FILE_COVERAGE_INFO} -o ./${FILE_COVERAGE_HTML}