Sha256: 3ca4d9421eaa0ba3e3b570287de440e3f2f8c833ebb35cda3ad244e561357df1

Contents?: true

Size: 867 Bytes

Versions: 6

Compression:

Stored size: 867 Bytes

Contents

# a ruote launch benchmark, as discussed with @hassox
# http://ruote.rubyforge.org/irclogs/ruote_2010-10-20.txt

puts
puts RUBY_VERSION
puts

require 'rubygems'
require 'benchmark'
require 'fileutils'
require 'ruote' # gem install ruote
require 'ruote/storage/fs_storage'

FileUtils.rm_rf('bench')

engine = Ruote::Engine.new(Ruote::FsStorage.new('bench'))

pdef = Ruote.process_definition do
  alpha :task => 'walk the dog'
  alpha :task => 'walk the dog'
  alpha :task => 'walk the dog'
  alpha :task => 'walk the dog'
  alpha :task => 'walk the dog'
  alpha :task => 'walk the dog'
  alpha :task => 'walk the dog'
  alpha :task => 'walk the dog'
  alpha :task => 'walk the dog'
  alpha :task => 'walk the dog'
end

Benchmark.benchmark(' ' * 31 + Benchmark::Tms::CAPTION, 31) do |b|
  b.report('1000 launches') do
    1000.times { engine.launch(pdef) }
  end
end

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
ruote-2.3.0.3 test/bm/launch_bench.rb
ruote-maestrodev-2.2.1 test/bm/launch_bench.rb
ruote-2.3.0.2 test/bm/launch_bench.rb
ruote-2.3.0.1 test/bm/launch_bench.rb
ruote-2.3.0 test/bm/launch_bench.rb
ruote-2.2.0 test/bm/launch_bench.rb