Sha256: 43fe19d842419a4fc940b7a79e223886e1d1d0475533eab043f679b566d65a16

Contents?: true

Size: 1003 Bytes

Versions: 3

Compression:

Stored size: 1003 Bytes

Contents

module Scrooge
  module Strategy
    class TrackThenScope < Base
      
      stage :track, :for => Scrooge::Base.profile.warmup do

        log( "Installing tracking middleware ... ", true )
        framework.install_tracking_middleware()
        log( "Start tracking ... ", true )        
        start_tracking!
      
      end
      
      stage :synchronize, :for => 10 do

        log( "Uninstalling tracking middleware ... ", true )
        framework.uninstall_tracking_middleware
        log( "Stop tracking ... ", true )
        stop_tracking!
        log( "Synchronize results with other processes ...", true )
        tracker.synchronize!
      
      end
      
      stage :aggregate, :for => 10 do

        log( "Aggregate results from other processes ...", true )  
        tracker.aggregate!
      
      end      
      
      stage :scope do

        log( "Scope ...", true ) 
        framework.install_scope_middleware( tracker )
      
      end            
      
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
methodmissing-scrooge-1.0.2 lib/scrooge/strategy/track_then_scope.rb
methodmissing-scrooge-1.0.3 lib/scrooge/strategy/track_then_scope.rb
methodmissing-scrooge-1.0.4 lib/scrooge/strategy/track_then_scope.rb