about summary refs log tree commit homepage
path: root/test
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2011-06-10 23:44:10 +0000
committerEric Wong <normalperson@yhbt.net>2011-06-10 23:44:10 +0000
commit987b9496171b090e62de488ddc7b9a175c4c8d33 (patch)
tree7cecb0eed5d1ccad70842978c75f4b8833e7e10d /test
parent1c033dfd66c713afb05911e5e220adb7fc4ddc17 (diff)
downloadunicorn-987b9496171b090e62de488ddc7b9a175c4c8d33.tar.gz
Stack depth affects Ruby GC performance, so lowering it
makes sense
Diffstat (limited to 'test')
-rw-r--r--test/benchmark/stack.ru8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/benchmark/stack.ru b/test/benchmark/stack.ru
new file mode 100644
index 0000000..fc9193f
--- /dev/null
+++ b/test/benchmark/stack.ru
@@ -0,0 +1,8 @@
+run(lambda { |env|
+  body = "#{caller.size}\n"
+  h = {
+    "Content-Length" => body.size.to_s,
+    "Content-Type" => "text/plain",
+  }
+  [ 200, h, [ body ] ]
+})