Sha256: 659cf0fa9d020ad557a652520ab72a86da4937c518e6d6481a12a74567e109e7

Contents?: true

Size: 754 Bytes

Versions: 180

Compression:

Stored size: 754 Bytes

Contents

# This benchmark is the simplest test of the I/O facilities in
# unicorn.  It is meant to return a fixed-sized blob to test
# the performance of things in Unicorn, _NOT_ the app.
#
# Adjusting this benchmark is done via the "bs" (byte size) and "count"
# environment variables.  "count" designates the count of elements of
# "bs" length in the Rack response body.  The defaults are bs=4096, count=1
# to return one 4096-byte chunk.
bs = ENV['bs'] ? ENV['bs'].to_i : 4096
count = ENV['count'] ? ENV['count'].to_i : 1
slice = (' ' * bs).freeze
body = (1..count).map { slice }.freeze
hdr = {
  'Content-Length' => (bs * count).to_s.freeze,
  'Content-Type' => 'text/plain'.freeze
}.freeze
response = [ 200, hdr, body ].freeze
run(lambda { |env| response })

Version data entries

180 entries across 180 versions & 14 rubygems

Version Path
unicorn-shopify-5.2.0.6 test/benchmark/dd.ru
unicorn-shopify-5.2.0.5 test/benchmark/dd.ru
unicorn-shopify-5.2.0.4 test/benchmark/dd.ru
unicorn-shopify-5.2.0.3 test/benchmark/dd.ru
unicorn-shopify-5.2.0.2 test/benchmark/dd.ru
unicorn-shopify-5.2.0.1 test/benchmark/dd.ru
unicorn-simon-0.0.7 test/benchmark/dd.ru
unicorn-simon-0.0.6 test/benchmark/dd.ru
unicorn-simon-0.0.5 test/benchmark/dd.ru
unicorn-simon-0.0.4 test/benchmark/dd.ru
unicorn-simon-0.0.3 test/benchmark/dd.ru
unicorn-simon-0.0.2 test/benchmark/dd.ru
unicorn-simon-0.0.1 test/benchmark/dd.ru
unicorn-shopify-4.8.2.5.25 test/benchmark/dd.ru
unicorn-shopify-4.8.2.5.24 test/benchmark/dd.ru
unicorn-shopify-4.8.2.5.23 test/benchmark/dd.ru
unicorn-5.2.0 test/benchmark/dd.ru
unicorn-5.1.0.4.gd5fbb test/benchmark/dd.ru
ish_lib_manager-0.0.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/unicorn-5.1.0/test/benchmark/dd.ru
unicorn-5.1.0 test/benchmark/dd.ru