Skip to content

Commit

Permalink
Added a "5xx status" column to the output to show the number of respo…
Browse files Browse the repository at this point in the history
…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
pauldowman authored and igrigorik committed Oct 18, 2009
1 parent 43b9261 commit 8f00acb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions autoperf.rb
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 8f00acb

Please sign in to comment.