about summary refs log tree commit homepage
path: root/test/benchmark/request.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/benchmark/request.rb')
-rw-r--r--test/benchmark/request.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/benchmark/request.rb b/test/benchmark/request.rb
index 67266cb..fc7822c 100644
--- a/test/benchmark/request.rb
+++ b/test/benchmark/request.rb
@@ -10,6 +10,9 @@ class TestClient
     buf.replace(@response)
   end
 
+  alias readpartial sysread
+
+  # old versions of Unicorn used this
   def unicorn_peeraddr
     '127.0.0.1'
   end
@@ -31,6 +34,12 @@ medium = TestClient.new([
 
 include Unicorn
 request = HttpRequest.new(Logger.new($stderr))
+unless request.respond_to?(:reset)
+  def request.reset
+    # no-op
+  end
+end
+
 Benchmark.bmbm do |x|
   x.report("small") do
     for i in 1..nr