fix: awk sprintf 括号+TPOT/TTFT 取最后一列
This commit is contained in:
@@ -178,13 +178,13 @@ cmd_report() {
|
||||
awk '
|
||||
/START:/ { name=$4; sub(/:$/, "", name); tps=""; tpot=""; ttft=""; acc="" }
|
||||
/Output token throughput/ { tps=$NF }
|
||||
/Mean TPOT/ { tpot=$(NF-1) }
|
||||
/Mean TTFT/ { ttft=$(NF-1) }
|
||||
/Mean TPOT/ { tpot=$NF }
|
||||
/Mean TTFT/ { ttft=$NF }
|
||||
/[Aa]ccept/ { acc=$0; gsub(/^ +/, "", acc) }
|
||||
/END\(exit/ {
|
||||
line=sprintf("%-22s out_tps=%-10s tpot_ms=%-8s ttft_ms=%-8s", name, tps, tpot, ttft)
|
||||
if (tps != "" && tpot != "" && tpot+0 > 0)
|
||||
line=line sprintf " eff_concurrency=%.1f", tps * tpot / 1000
|
||||
line=line sprintf(" eff_concurrency=%.1f", tps * tpot / 1000)
|
||||
print line
|
||||
if (acc != "") print " " acc
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user