Sha256: 114a283cd8da52d5e9a57d3678d0cb70015653e56a858899b3993c9b9150bd6a

Contents?: true

Size: 482 Bytes

Versions: 7

Compression:

Stored size: 482 Bytes

Contents

#!/usr/bin/env ruby
require "net/http"

app_path = File.expand_path('../examples/constant_caches.ru', __dir__)

puts "Booting server..."
pid = Process.spawn(*ARGV, app_path, out: File::NULL, err: File::NULL)
sleep 5
app_url = "http://localhost:#{ENV.fetch('PORT')}/"
puts "Warming the app with ab..."
system("ab", "-c", "4", "-n", "500", app_url, out: File::NULL, err: File::NULL)
sleep 3
puts "Memory Usage:"
puts Net::HTTP.get(URI(app_url))

Process.kill("TERM", pid)
Process.wait

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
pitchfork-0.5.0 benchmark/cow_benchmark.rb
pitchfork-0.4.1 benchmark/cow_benchmark.rb
pitchfork-0.4.0 benchmark/cow_benchmark.rb
pitchfork-0.3.0 benchmark/cow_benchmark.rb
pitchfork-0.2.0 benchmark/cow_benchmark.rb
pitchfork-0.1.2 benchmark/cow_benchmark.rb
pitchfork-0.1.1 benchmark/cow_benchmark.rb