获取ab测试结果的rps

while (<>){
printf("%20s\t",$1)  if /Server Software:\s+(.*?)\n/;
printf("%10d\n",$1)  if /Requests per second:\s+(\d+\.\d+)/;

}

编程技巧