Sha256: 254883eb03cfd2cf9ef138565893e6a5dea2bba25c42b0c04e58bd2545b7a93f
Contents?: true
Size: 629 Bytes
Versions: 2
Compression:
Stored size: 629 Bytes
Contents
require 'benchmark' require File.dirname(__FILE__) + '/para_creator' class UrlBenachmark < Shoes include ParaCreator url '/', :index url '/first', :first url '/second', :second def index button 'Start benchmark' do Benchmark.bm do |benchmark| benchmark.report '10 switches' do 10.times do visit_both end end benchmark.report ' 30 switches' do 30.times do visit_both end end end end end def first create_paras 4 end def second create_paras 5 end def visit_both visit '/first' visit '/second' end end Shoes.app
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
shoes-4.0.0.pre2 | benchmark/urls.rb |
shoes-4.0.0.pre1 | benchmark/urls.rb |