Skip to content

Commit

Permalink
test(benchmark): skip checking completion time in hot processing (#3993)
Browse files Browse the repository at this point in the history
  • Loading branch information
curbengh authored and SukkaW committed Dec 20, 2019
1 parent 9b49688 commit 3b58c63
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions test/benchmark.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,16 @@ LOG_TABLE () {
total_time=$(_SUBSTRUCTION $time_database_saved $time_begin | xargs -0 printf "%.0f")
line_number=$(wc -l build.log | cut -d" " -f1)

if [ $total_time -lt 10 ] || ([ $line_number -lt 300 ] && [ $1 != "HOT" ]); then
echo "--------------------------------------------"
echo -e '\033[41;37m !! Build failed !! \033[0m'
head -n 400 build.log
exit 1
if [ "$1" != "HOT" ]; then
if [ "$total_time" -lt 10 ] || [ "$line_number" -lt 300 ]; then
echo "--------------------------------------------"
echo -e '\033[41;37m !! Build failed !! \033[0m'
head -n 400 build.log
exit 1
fi
fi

if [ $total_time -gt 40 ]; then
if [ "$total_time" -gt 40 ]; then
echo "--------------------------------------------"
echo -e '\033[41;37m !! Performance regression detected !! \033[0m'
exit 1
Expand Down

0 comments on commit 3b58c63

Please sign in to comment.