Created
March 31, 2012 12:44
-
-
Save mtkd/2263694 to your computer and use it in GitHub Desktop.
wlll: parsing values hack
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
s = %Q{ | |
Maximum connect burst length: 1 | |
Total: connections 20000 requests 20000 replies 20000 test-duration 592.676 s | |
Connection rate: 33.7 conn/s (29.6 ms/conn, <=1 concurrent connections) | |
Connection time [ms]: min 10.8 avg 29.6 max 11652.5 median 11.5 stddev 217.1 | |
Connection time [ms]: connect 27.6 | |
Connection length [replies/conn]: 1.000 | |
Request rate: 33.7 req/s (29.6 ms/req) | |
Request size [B]: 73.0 | |
Reply rate [replies/s]: min 0.0 avg 33.7 max 76.2 stddev 19.3 (118 samples) | |
Reply time [ms]: response 2.1 transfer 0.0 | |
Reply size [B]: header 215.0 content 6.0 footer 0.0 (total 221.0) | |
Reply status: 1xx=0 2xx=20000 3xx=0 4xx=0 5xx=0 | |
CPU time [s]: user 197.28 system 394.31 (user 33.3% system 66.5% total 99.8%) | |
Net I/O: 9.7 KB/s (0.1*10^6 bps) | |
Errors: total 0 client-timo 0 socket-timo 0 connrefused 0 connreset 0 | |
Errors: fd-unavail 0 addrunavail 0 ftab-full 0 other 0 | |
} | |
s = s.gsub('(','').gsub(')','') | |
a = s.split(" ").select { |x| x =~ /^[\d]+(\.[\d]+){0,1}$/ } | |
[1,4,5,7,8,9,10,11,14,15,17,18,19].each_with_index { |x, i| puts "#{i+1} #{a[x]}" } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment