Permalink
Browse files

Added a "5xx status" column to the output to show the number of respo…

…nses that had a status of 500, 503, etc. and show full info when it's not zero. If you are getting 5xx responses it's probably an error, quite possibly caused by the load.
  • Loading branch information...
1 parent d3ac777 commit 8174993eab8008c3e288439a7aeb17f784c181a9 @pauldowman pauldowman committed Oct 17, 2009
Showing with 3 additions and 2 deletions.
  1. +3 −2 autoperf.rb
View
5 autoperf.rb
@@ -73,6 +73,7 @@ def benchmark(conf)
res['replies/s avg'] = $2
res['replies/s max'] = $3
res['replies/s stddev'] = $4
+ when /^Reply status: 1xx=\d+ 2xx=\d+ 3xx=\d+ 4xx=\d+ 5xx=(\d+)/ then res['5xx status'] = $1
end
end
end
@@ -83,14 +84,14 @@ def benchmark(conf)
def run
results = {}
report = Table(:column_names => ['rate', 'conn/s', 'req/s', 'replies/s avg',
- 'errors', 'net io (KB/s)'])
+ 'errors', '5xx status', 'net io (KB/s)'])
(@conf['low_rate'].to_i..@conf['high_rate'].to_i).step(@conf['rate_step'].to_i) do |rate|
results[rate] = benchmark(@conf.merge({'httperf_rate' => rate}))
report << results[rate].merge({'rate' => rate})
puts report.to_s
- puts results[rate]['output'] if results[rate]['errors'].to_i > 0
+ puts results[rate]['output'] if results[rate]['errors'].to_i > 0 || results[rate]['5xx status'].to_i > 0
end
end
end

0 comments on commit 8174993

Please sign in to comment.