Sha256: 57437dcdcfb692d24b32433798a9a03a20ee3599fb1cb9d21b4dfacbd9327b7a

Contents?: true

Size: 955 Bytes

Versions: 17

Compression:

Stored size: 955 Bytes

Contents

#
# Testing Ruote (OpenWFEru)
#
# John Mettraux at openwfe.org
#
# Mon Aug  3 17:17:13 JST 2009
#

require 'benchmark'
require 'rubygems'

require File.dirname(__FILE__) + '/../path_helper'
require File.dirname(__FILE__) + '/../functional/engine_helper'

require 'ruote/log/test_logger'
require 'ruote/part/hash_participant'

N = 1000
#N = 100

ac = {
  #:definition_in_launchitem_allowed => true
}

engine = determine_engine_class(ac).new(ac)

pdef = Ruote.process_definition :name => 'test' do
  alpha
end

engine.register_participant :alpha, Ruote::HashParticipant

Benchmark.benchmark(' ' * 31 + Benchmark::Tms::CAPTION, 31) do |b|

  wfid = nil

  b.report("launch #{N} processes") do
    N.times { wfid = engine.launch(pdef) }
  end

  sleep 3

  b.report("listing 1 process") do
    engine.process(wfid)
  end
  b.report("listing #{N} processes") do
    ps = engine.processes
    p [ :wrong, ps.size ] if ps.size != N
  end
end

#engine.shutdown

Version data entries

17 entries across 17 versions & 2 rubygems

Version Path
ruote-2.3.0.3 test/bm/juuman.rb
ruote-maestrodev-2.2.1 test/bm/juuman.rb
ruote-2.3.0.2 test/bm/juuman.rb
ruote-2.3.0.1 test/bm/juuman.rb
ruote-2.3.0 test/bm/juuman.rb
ruote-2.2.0 test/bm/juuman.rb
ruote-2.1.11 test/bm/juuman.rb
ruote-2.1.10 test/bm/juuman.rb
ruote-2.1.9 test/bm/juuman.rb
ruote-2.1.8 test/bm/juuman.rb
ruote-2.1.7 test/bm/juuman.rb
ruote-2.1.6 test/bm/juuman.rb
ruote-2.1.5 test/bm/juuman.rb
ruote-2.1.4 test/bm/juuman.rb
ruote-2.1.3 test/bm/juuman.rb
ruote-2.1.2 test/bm/juuman.rb
ruote-2.1.1 test/bm/juuman.rb