Sha256: 041b0b0ef866e05ade9e91fec0ff84c002148ce6a0854cf47d3639ae493bd80f

Contents?: true

Size: 481 Bytes

Versions: 8

Compression:

Stored size: 481 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("INT", pid)
Process.wait

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
pitchfork-0.12.0 benchmark/cow_benchmark.rb
pitchfork-0.11.1 benchmark/cow_benchmark.rb
pitchfork-0.11.0 benchmark/cow_benchmark.rb
pitchfork-0.10.0 benchmark/cow_benchmark.rb
pitchfork-0.9.0 benchmark/cow_benchmark.rb
pitchfork-0.8.0 benchmark/cow_benchmark.rb
pitchfork-0.7.0 benchmark/cow_benchmark.rb
pitchfork-0.6.0 benchmark/cow_benchmark.rb