benchmark/application.rb in ebb-0.0.4 vs benchmark/application.rb in ebb-0.1.0
- old
+ new
@@ -33,11 +33,11 @@
raise "fibonacci called with n <= 0" if n <= 0
body = (1..n).to_a.map { |i| fib(i).to_s }.join(' ')
status = 200
elsif commands.include?('wait')
- n = commands.last.to_i
+ n = commands.last.to_f
raise "wait called with n <= 0" if n <= 0
wait(n)
body = "waited about #{n} seconds"
status = 200
@@ -72,13 +72,7 @@
end
if $0 == __FILE__
require DIR + '/../ruby_lib/ebb'
- require 'rubygems'
- require 'ruby-debug'
- Debugger.start
-
- server = Ebb::Server.new(SimpleApp.new, :port => 4001)
- puts "Ebb started on http://0.0.0.0:4001/"
- server.start
-end
\ No newline at end of file
+ server = Ebb::start_server(SimpleApp.new, :port => 4001)
+end