//第二列,新订单成功执行压测的次数(推迟执行压测的次数):90%事务的响应时间|本轮测试最大响应时间,新订单事务数也被认为是总有效事务数的指标
//第三列,支付业务成功执行次数(推迟执行次数):90%事务的响应时间|本轮测试最大响应时间
//第四列,订单状态业务的结果,后面几个的意义同上
//第五列,物流发货业务的结果,后面几个的意义同上
//第六列,库存仓储业务的结果,后面几个的意义同上
-- 压测结束
STOPPING THREADS................
<Raw Results>
[0] sc:4 lt:243 rt:546999 fl:275 //New-Order,新订单业务成功(success,简写sc)次数,延迟(late,简写lt)次数,重试(retry,简写rt)次数,失败(failure,简写fl)次数
[1] sc:144 lt:92 rt:565412 fl:281 //Payment,支付业务统计,其他同上
[2] sc:24 lt:3 rt:50802 fl:26 //Order-Status,订单状态业务统计,其他同上
[3] sc:52 lt:0 rt:0 fl:0 //Delivery,发货业务统计,其他同上
[4] sc:0 lt:27 rt:50788 fl:26 //Stock-Level,库存业务统计,其他同上
in 1200 sec.
<Raw Results2(sum ver.)>
[0] sc:4 lt:243 rt:547120 fl:275
[1] sc:144 lt:92 rt:565566 fl:281
[2] sc:24 lt:3 rt:50802 fl:26
[3] sc:52 lt:0 rt:0 fl:0
[4] sc:0 lt:27 rt:50788 fl:26
<Constraint Check> (all must be [OK]) //下面所有业务逻辑结果都必须为 OK 才行
[transaction percentage]
Payment: 40.07% (>=43.0%) [NG] * //支付成功次数(上述统计结果中 sc + lt)必须大于43.0%,否则结果为NG,而不是OK
Order-Status: 4.58% (>= 4.0%) [OK] //订单
Delivery: 8.83% (>= 4.0%) [OK] //发货
Stock-Level: 4.58% (>= 4.0%) [OK] //库存
[response time (at least 90% passed)] //响应耗时指标必须超过90%通过才行
New-Order: 1.62% [NG] *
Payment: 61.02% [NG] *
Order-Status: 88.89% [NG] *
Delivery: 100.00% [OK]
Stock-Level: 0.00% [NG] *
<TpmC>
12.350 TpmC -- TpmC结果值(每分钟事务数)
四、使用gnuplot 绘图
绘图脚本
./tpcc_analyze.sh 512m-tpcc-data.log > 512m-tpcc-data.data
./tpcc_analyze.sh 1g-tpcc-data.log > 1g-tpcc-data.data
./tpcc_analyze.sh 2g-tpcc-data.log > 2g-tpcc-data.data
paste 512m-tpcc-data.data 1g-tpcc-data.data 2g-tpcc-data.data > tpcc-data.data
./tpcc-graph.sh tpcc-data.data tpcc.jpg
tpcc_analyze.sh
#!/bin/bash
TIMESLOT=1
if [ -n "$2" ]
then
TIMESLOT=$2
echo "Defined $2"
fi
cat $1 | grep -v HY000 | grep -v payment | grep -v neword | \
awk -v timeslot=$TIMESLOT ' BEGIN { FS="[,():]"; s=0; cntr=0; aggr=0 } \
/MEASURING START/ { s=1} /STOPPING THREADS/ {s=0} /0/ { if (s==1) { cntr++; aggr+=$2; } \
if ( cntr==timeslot ) { printf ("%d %3f\n",$1,$5) ; cntr=0; aggr=0 } } '
tpcc_graph.sh
#!/bin/bash
gnuplot << EOP
set style line 1 lt 1 lw 3
set style line 2 lt 5 lw 3
set style line 3 lt 7 lw 3
set terminal png size 960,480
set grid x y
set xlabel "Time(sec)"
set ylabel "Transactions"
set output "$2"
plot "$1" using 1:2 title "PS 5.1.56 buffer pool 512MM" ls 1 with lines,\
"$1" using 3:4 title "PS 5.1.56 buffer pool 1g" ls 2 with lines,\
"$1" using 3:6 title "PS 5.1.56 buffer pool 2g" ls 3 with lines axes x1y1
EOP
可能出现的错误
Could not find/open font when opening font "arial", using internal non-scalable font
export GDFONTPATH=/usr/share/fonts/liberation
export GNUPLOT_DEFAULT_GDFONT=LiberationSans-Regular
source ~/.bashrc
参考文章