-1

I have two different servers running locally with different configurations. I'm interested in seeing with is repeatedly better/faster. I'm using siege right now

$  siege -r 100 -b http://localhost:3000
$  siege -r 100 -b http://localhost:3001

I can compare the results manually, but between two different runs of siege on the same server, there is variance in results. Is there any way to get an iterations per second report of both endpoints along with any kind of statistical analysis? Basically I want an output similar to

  http://localhost:3000/    147625 i/100ms
  http://localhost:3001/    151046 i/100ms
  http://localhost:3002/    172914 i/100ms
-------------------------------------------------
  http://localhost:3000/  9247039.5 (±13.2%) i/s -   45320875 in   5.009003s
  http://localhost:3001/ 26436533.8 (±22.1%) i/s -  124461904 in   4.994989s
  http://localhost:3002/ 32227427.9 (±13.0%) i/s -  157524654 in   5.002928s

Are there any good tools or methods available to tell me which endpoint is consistently faster and by how much? Bonus points if I can install that tool on a Mac.

Schneems
  • 187
  • 3
  • 12
  • Apparently benchmarking servers is not something people ask questions about on serverfault, thanks for the anonymous down vote with no comment anonymous user! – Schneems Aug 04 '14 at 15:28

1 Answers1

0

Not cannonical but worked well for me, I was able to get consistent results doing this:

require 'benchmark/ips'
require 'net/http'
require 'uri'

L3002 = URI.parse "http://localhost:3002/"
L3001 = URI.parse "http://localhost:3001/"

Benchmark.ips do |x|
  x.config(time: 5, warmup: 5)
  x.report("3002") { Net::HTTP.get_response(L3002)  }
  x.report("3001") { Net::HTTP.get_response(L3001) }
  x.compare!
end
Schneems
  • 187
  • 3
  • 12