Created
November 8, 2012 05:00
-
-
Save anonymous/4036883 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'ruote' | |
| ruote = | |
| Ruote::Dashboard.new( | |
| Ruote::Worker.new( | |
| Ruote::HashStorage.new( | |
| 'wait_logger_max' => 12_000_000))) | |
| ruote.noisy = ENV['NOISY'] == 'true' | |
| N = 1000 | |
| pdef = Ruote.define do | |
| #iterator :on => (1..N).to_a do | |
| citerator :on => (1..N).to_a do | |
| noop | |
| end | |
| end | |
| wfid = ruote.launch(pdef) | |
| ruote.wait_for(wfid, :timeout => -1) # -1 disables the timeout | |
| puts | |
| puts "operations: #{ruote.logger.log.size}" | |
| puts | |
| # iterator 1..10 => 44 ops | |
| # iterator 1..100 => 404 ops | |
| # iterator 1..1000 => 4004 ops | |
| # | |
| # citerator 1..10 => 24 ops | |
| # citerator 1..100 => 204 ops | |
| # citerator 1..1000 => 2004 ops |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment