Changeset 1016

Show
Ignore:
Timestamp:
11/17/07 13:01:44 (11 months ago)
Author:
e.@brainspl.at
Message:

add static file bench

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • apps/benchmark/app/controllers/perf.rb

    r992 r1016  
    66   
    77  def simple_template 
     8    render :layout => :none 
     9  end 
     10   
     11  def with_layout 
    812    render 
    913  end 
  • apps/benchmark/script/benchmark

    r1011 r1016  
    66  err.puts "* Starting Merb" 
    77  ENV["EVENT"] = "1" 
    8   `merb -d -e production` 
     8  `env EVENT=1 merb -d -e production` 
    99  pid = File.read("#{File.dirname(__FILE__)}/../log/merb.4000.pid") 
    10  
     10  sleep 5 
    1111  ps = `ps aux #{pid}` 
    1212  memsize = (ps.split("\n")[1].split[5].to_f / 10.24).round / 100.0 
     
    1515 
    1616  TIMES = ARGV.find{|x| x =~ /^-t/ }[2..-1].to_i rescue 1000 
    17   CNCRC = ARGV.find{|x| x =~ /^-c/ }[2..-1].to_i rescue 5 
     17  CNCRC = ARGV.find{|x| x =~ /^-c/ }[2..-1].to_i rescue 1 
     18   
    1819 
    1920  def call_ab(msg, url) 
     
    5455 
    5556  sleep 1 
     57 
     58  put_header_message("Static files") 
     59  call_ab("Serve Static File", "hello.txt")  
    5660   
    5761  put_header_message("Templates and Partials")