Permalink
Browse files

Add giant.ru example for output performance.

  • Loading branch information...
dekellum committed Feb 12, 2012
1 parent d79500f commit c90ddd671bc3527c14f962251080870a4fcfdf4f
Showing with 28 additions and 0 deletions.
  1. +28 −0 example/giant.ru
View
@@ -0,0 +1,28 @@
+#\ -s Fishwife -p 9297 -E production
+# -*- ruby -*-
+
+require 'rjack-logback'
+RJack::Logback.config_console( :stderr => true, :thread => true )
+
+class GiantGenerator
+ FILLER = <<-END
+ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do
+ eiusmod tempor incididunt ut labore et dolore magna aliqua.
+ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do
+ eiusmod tempor incididunt ut labore et dolore magna aliqua.
+ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do
+ eiusmod tempor incididunt ut labore et dolore magna aliqua.
+ END
+
+ def each
+ loop { yield FILLER[0..rand( FILLER.size)] }
+ end
+end
+
+class App
+ def call( env )
+ [ 200, { 'Content-Type' => 'text/plain' }, GiantGenerator.new ]
+ end
+end
+
+run App.new

0 comments on commit c90ddd6

Please sign in to comment.