From 90f5d02ce2a777a128f2fe673c550ec7ba587e90 Mon Sep 17 00:00:00 2001 From: h00467646 Date: Wed, 13 Sep 2023 10:26:29 +0800 Subject: [PATCH] =?UTF-8?q?[=E6=8E=A8=E8=8D=90=E5=B7=A5=E5=85=B7]mxRec?= =?UTF-8?q?=E6=80=A7=E8=83=BD=E5=88=86=E6=9E=90=E5=B7=A5=E5=85=B7=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=E6=9B=B4=E6=96=B0=EF=BC=8C=E5=A2=9E=E5=8A=A0=E5=AF=B9?= =?UTF-8?q?global=5Funique=E7=9A=84=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tools/perf/fast.sh | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/tools/perf/fast.sh b/tools/perf/fast.sh index aae6f9d4..19f4eb24 100644 --- a/tools/perf/fast.sh +++ b/tools/perf/fast.sh @@ -79,13 +79,13 @@ parse_pipe_1_data_parser() LOG_INFO "Step-1.x ReadEmbKeyV2 Static" fi - grep 'read batch cost(ms)' $logfile | cut -d" " -f7| \ + grep 'read batch cost(ms)' $logfile | cut -d" " -f9| \ awk -F "[:,]" '{sum+=$2} END {printf "read batch cost: avg=%0.1f\n", sum/NR}' - grep 'enqueueTC(ms)' $logfile | grep -v 'timeout' | cut -d" " -f11 | \ + grep 'enqueueTC(ms)' $logfile | grep -v 'timeout' | cut -d" " -f12 | \ awk -F "[:,]" '{sum+=$2} END {printf "--|enqueueTC: avg=%0.1f\n", sum/NR}' - grep 'elapsed from last(ms)' $logfile | grep -v 'timeout' | cut -d" " -f10 | \ + grep 'elapsed from last(ms)' $logfile | grep -v 'timeout' | cut -d" " -f12 | \ awk -F "[:,]" '{print $2}' | \ awk 'BEGIN {sum=0; count=0} {if($1<1000) {sum+=$NF; count++} } END \ {printf "elapsed from last: avg=%0.1f\n", sum/count}' @@ -95,7 +95,7 @@ parse_pipe_2_key_process() { LOG_NOTICE "Pipe-2: Data Preprocess" - grep 'getAndProcessTC(ms)' $logfile | cut -d" " -f5 | \ + grep 'getAndProcessTC(ms)' $logfile | cut -d" " -f6 | \ awk -F"[:,]" '{print $2}' | \ awk 'BEGIN{count=0; total=0;} {if ($1<2000) {total+=$NF; count++;}} END \ {printf "getAndProcessTC(filter>2000ms): avg=%0.3f\n", total/count}' @@ -117,7 +117,7 @@ parse_pipe_2_key_process() LOG_INFO "Step-2.2 KeyProcess" - grep 'key process cost' $logfile | cut -d" " -f8 | cut -d ":" -f2 | cut -d"," -f1 | grep '^[0-9]' | grep '[0-9]$' | \ + grep 'key process cost' $logfile | cut -d" " -f9 | cut -d ":" -f2 | cut -d"," -f1 | grep '^[0-9]' | grep '[0-9]$' | \ awk 'BEGIN {sum=0; count=0;} {if($NF<2000) {sum+=$NF; count++;}} END \ {printf "--|key process cost(filter>2000): avg=%0.1f\n", sum/count}' @@ -184,6 +184,18 @@ parse_pipe_2_key_process() awk -F":" '{sum+=$NF} END {printf "----|key2OffsetTC: avg=%0.1f\n", sum/NR}' fi + $(grep 'featureAdmitAndEvictTC(ms)' $logfile > /dev/null 2>&1) + if [ $? == 0 ]; then + grep 'featureAdmitAndEvictTC(ms)' $logfile | \ + awk -F":" '{sum+=$NF} END {printf "----|featureAdmitAndEvictTC: avg=%0.1f\n", sum/NR}' + fi + + $(grep 'globalUniqueSyncTC(ms)' $logfile > /dev/null 2>&1) + if [ $? == 0 ]; then + grep 'globalUniqueSyncTC(ms)' $logfile | \ + awk -F":" '{sum+=$NF} END {printf "----|globalUniqueSyncTC, avg=%0.1f\n", sum/NR}' + fi + $(grep 'pushResultTC(ms)' $logfile > /dev/null 2>&1) if [ $? == 0 ]; then grep 'pushResultTC(ms)' $logfile | \ @@ -235,7 +247,7 @@ parse_pipe_3_get_and_send_tensors_with_ddr() {printf "parseKeyTC(filter>1000ms): avg=%0.1f\n", sum/count}' - grep 'getAndSendTensorsTC' $logfile | \ + grep 'getAndSendTensorsTC' $logfile | awk -F "[:,]" '{print $6}' | \ awk -F":" 'BEGIN {sum=0; count=0;} {if($NF<10000) {sum+=$NF; count++;}} END \ {printf "--getAndSendTensorsTC(filter>1000ms): avg=%0.1f\n", sum/count}' @@ -269,7 +281,7 @@ parse_pipe_3_get_and_send_tensors_with_ddr() awk -F":" 'BEGIN {sum=0; count=0;} {if($NF<10000) {sum+=$NF; count++;}} END \ {printf "----hostEmbsTC(filter>1000ms): avg=%0.1f\n", sum/count}' - grep 'EmbHDTrans' $logfile | \ + grep 'EmbHDTrans' $logfile | awk -F "[:]" '{print $5}' | cut -d " " -f1 | \ awk -F":" 'BEGIN {sum=0; count=0;} {if($NF<10000) {sum+=$NF; count++;}} END \ {printf "----EmbHDTrans(filter>1000ms): avg=%0.1f\n", sum/count}' -- Gitee