-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsb_calc
executable file
·25 lines (21 loc) · 1.13 KB
/
sb_calc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/usr/bin/perl
use strict;
use warnings;
print "threads,tps,qps,read,write,other,err,reconn\n";
while (<>) {
chomp;
next if (!/thds:/);
my($thds) = /thds: (\d+)/;
my($tps) = /tps: ([\d\.]+)/;
my($qps) = /qps: ([\d\.]+)/;
my($r, $w, $o) = /r\/w\/o: ([\d\.]+)\/([\d\.]+)\/([\d\.]+)/;
my($err) = /err\/s: ([\d\.]+)/;
my($reconn) = /reconn\/s: ([\d\.]+)/;
print "$thds,$tps,$qps,$r,$w,$o,$err,$reconn\n";
}
# [ 1s ] thds: 32 tps: 451.44 qps: 9633.46 (r/w/o: 6765.70/1761.03/1106.73) lat (ms,95%): 125.52 err/s: 0.00 reconn/s: 0.00
# [ 2s ] thds: 32 tps: 374.49 qps: 7444.84 (r/w/o: 5233.92/1317.74/893.18) lat (ms,95%): 125.52 err/s: 0.00 reconn/s: 0.00
# [ 3s ] thds: 32 tps: 442.00 qps: 8884.97 (r/w/o: 6196.98/1660.00/1028.00) lat (ms,95%): 102.97 err/s: 0.00 reconn/s: 0.00
# [ 4s ] thds: 32 tps: 392.99 qps: 7859.80 (r/w/o: 5501.86/1445.96/911.98) lat (ms,95%): 118.92 err/s: 0.00 reconn/s: 0.00
# [ 5s ] thds: 32 tps: 290.20 qps: 5803.94 (r/w/o: 4062.76/1061.72/679.46) lat (ms,95%): 158.63 err/s: 0.00 reconn/s: 0.00
# [ 6s ] thds: 32 tps: 393.61 qps: 7856.29 (r/w/o: 5498.61/1416.61/941.08) lat (ms,95%): 123.28 err/s: 0.00 reconn/s: 0.00