Sha256: 1d84455e7b28dcb01e34e788c15f8da0ed9485d3746f888ba5c827d84dd13d7e

Contents?: true

Size: 702 Bytes

Versions: 24

Compression:

Stored size: 702 Bytes

Contents

rad.conveyors

class ConveyorLogger < Rad::Conveyors::Processor            
  def call
    begin
      start_time = Time.now
      next_processor.call
      
      # if workspace.trace?
      #   total_time = workspace.trace.inject(0){|memo, pair| memo += pair.last}
      #   max_pair = workspace.trace.max_by{|pair| pair.last}
      #   logger.info "Completed in #{(total_time * 1000).round} ms (#{(max_pair.last * 1000).round} ms taken by #{max_pair.first})\n\n"
      # else
      logger.info "RAD completed in #{((Time.now - start_time) * 1000).round} ms\n"
      # end
    rescue StandardError => e
      raise e if rad.test?
        
      logger.error e
      logger.info "\n"
    end
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
rad_core-0.2.6 lib/rad/conveyors/processors/conveyor_logger.rb
rad_core-0.2.5 lib/rad/conveyors/processors/conveyor_logger.rb
rad_core-0.2.4 lib/rad/conveyors/processors/conveyor_logger.rb
rad_core-0.2.3 lib/rad/conveyors/processors/conveyor_logger.rb
rad_core-0.2.2 lib/rad/conveyors/processors/conveyor_logger.rb
rad_core-0.2.1 lib/rad/conveyors/processors/conveyor_logger.rb
rad_core-0.2.0 lib/rad/conveyors/processors/conveyor_logger.rb
rad_core-0.0.30 lib/rad/conveyors/processors/conveyor_logger.rb
rad_core-0.0.29 lib/rad/conveyors/processors/conveyor_logger.rb
rad_core-0.0.28 lib/rad/conveyors/processors/conveyor_logger.rb
rad_core-0.0.27 lib/rad/conveyors/processors/conveyor_logger.rb
rad_core-0.0.26 lib/rad/conveyors/processors/conveyor_logger.rb
rad_core-0.0.25 lib/rad/conveyors/processors/conveyor_logger.rb
rad_core-0.0.24 lib/rad/conveyors/processors/conveyor_logger.rb
rad_core-0.0.23 lib/rad/conveyors/processors/conveyor_logger.rb
rad_core-0.0.22 lib/rad/conveyors/processors/conveyor_logger.rb
rad_core-0.0.21 lib/rad/conveyors/processors/conveyor_logger.rb
rad_core-0.0.20 lib/rad/conveyors/processors/conveyor_logger.rb
rad_core-0.0.19 lib/rad/conveyors/processors/conveyor_logger.rb
rad_core-0.0.18 lib/rad/conveyors/processors/conveyor_logger.rb