Sha256: 30580da331ddce613be63758fb4f2deb59cccde31944a068bcf448b36baa6ea0

Contents?: true

Size: 1.52 KB

Versions: 2

Compression:

Stored size: 1.52 KB

Contents

#
# Testing OpenWFE
#
# John Mettraux at openwfe.org
#
# Mon Dec 24 22:02:12 JST 2007
#

#require 'profile'

require 'flowtestbase'
require 'openwfe/def'

include OpenWFE


class FlowTest26d < Test::Unit::TestCase
    include FlowTestBase

    #def setup
    #end

    #def teardown
    #end

    #
    # Test 0
    #

    #N = 10_000
    N = 1_000

    class TestDefinition0 < ProcessDefinition
        concurrence do
            N.times do
                count
            end
        end
    end

    def test_load_0

        #log_level_to_debug

        #@engine.get_scheduler.sstop
            #
            # JRuby is no friend of the Scheduler ( was :) )

        $count = 0

        @engine.register_participant("count") do |workitem|
            $count += 1
            print "."
        end

        fei = @engine.launch(LaunchItem.new(TestDefinition0))
        puts "launched #{fei}"

        #log_level_to_debug

        @engine.wait_for fei

        assert_equal N, $count
    end

    #
    # Thu Sep 13 15:41:20 JST 2007
    #
    # ruby 1.8.5 (2006-12-25 patchlevel 12) [i686-darwin8.8.3]
    #
    # 10_000 in 27.69s
    #
    # before optimization : 10k in 138.341
    #
    #
    # ruby 1.8.5 (2007-09-13 rev 3876) [i386-jruby1.1]
    #
    # 10_000 in 53.96s
    #
    # ruby 1.8.5 (2007-09-13 rev 3876) [i386-jruby1.1]
    # -O -J-server
    #
    # 10_000 in 42.616s

    #
    # Thu Nov  8 21:36:02 JST 2007
    #
    # ruby 1.8.6 (2007-06-07 patchlevel 36) [universal-darwin9.0]
    #
    # 10_000 in 39.089
    #
    # ?
    #

end

Version data entries

2 entries across 2 versions & 2 rubygems

Version Path
openwferu-0.9.17 test/bm/ft_26d_load.rb
ruote-0.9.18 test/bm/ft_26d_load.rb