zgrep "run time:" qcredit.2016-03-14.log.gz
|awk '{print $(NF-3),$(NF-1)}'
|sed 's/QT-[0-9]\{10,20\}//'
|sed 's/pool-[0-9]\{1,3\}-thread-[0-9]\{1,3\}//'
|sort
|uniq -c
|sed 's/time://'
|sort - k 3n
|sed 's/:method://'
|awk
'{{if($NF<=5) {a[$2" 5"] += $1;} else if($NF<=10) {a[$2 " 10"] += $1;} else if($NF<=20) {a[$2" 20"] += $1;} else if($NF<=30) {a[$2" 30"] += $1;} else if($NF<=40) {a[$2" 40"] += $1;} else if($NF<=50) {a[$2" 50"] += $1;}else if($NF<=60) {a[$2" 60"] += $1;} else {a[$2" 61+"] += $1}} cs[$2] += $1;}
END{ for( i in a) {print i, a[i],a[i]/cs[substr(i,0,index(i," ")-1)] }}'
|sort -k 1,1r -n -k 2
|awk '{print $1"\t"$2"\t"$3"\t"$4}' >~/all-htime2.txt