0
-$: << File.expand_path(File.dirname(__FILE__) + '/..')
0
+$: << File.expand_path(File.dirname(__FILE__))
0
- alias :kilobyte :kilobytes
0
- alias :megabyte :megabytes
0
- alias :gigabyte :gigabytes
0
- alias :terabyte :terabytes
0
- alias :petabyte :petabytes
0
- alias :exabyte :exabytes
0
-def number_to_human_size(size, precision=1)
0
- size = Kernel.Float(size)
0
- when size.to_i == 1; "1 Byte"
0
- when size < 1.kilobyte; "%d Bytes" % size
0
- when size < 1.megabyte; "%.#{precision}f KB" % (size / 1.0.kilobyte)
0
- when size < 1.gigabyte; "%.#{precision}f MB" % (size / 1.0.megabyte)
0
- when size < 1.terabyte; "%.#{precision}f GB" % (size / 1.0.gigabyte)
0
- else "%.#{precision}f TB" % (size / 1.0.terabyte)
0
- end.sub(/([0-9])\.?0+ /, '\1 ' )
0
@@ -140,7 +86,45 @@ class ServerTest
0
puts "Starting #{name}"
0
- @pid = fork { @start_block.call }
0
+ @pid = fork { start_emongrel }
0
+ @pid = fork { start_ebb }
0
+ @pid = fork { start_mongrel }
0
+ @pid = fork { start_thin }
0
+ @pid = fork { @start_block.call }
0
+ require 'swiftcore/evented_mongrel'
0
+ Rack::Handler::Mongrel.run(app, :Port => @port)
0
+ require File.dirname(__FILE__) + '/../ruby_lib/ebb'
0
+ server = Ebb::Server.new(app, :port => @port)
0
+ Rack::Handler::Mongrel.run(app, :Port => @port)
0
+ Rack::Handler::Thin.run(app, :Port => @port)
0
def trial(options = {})
0
@@ -231,7 +215,6 @@ class ServerTest
0
$servers << ServerTest.new('emongrel', 4001) do
0
require 'swiftcore/evented_mongrel'
Comments
No one has commented yet.