Sha256: 578b1896d47a9548043476dc5c2212c356d122b4357c7331fd16f3ef6cc716a0

Contents?: true

Size: 626 Bytes

Versions: 45

Compression:

Stored size: 626 Bytes

Contents

require 'parallel_tests/gherkin/io'

module ParallelTests
  module Gherkin
    class RuntimeLogger
      include Io

      def initialize(step_mother, path_or_io, options)
        @io = prepare_io(path_or_io)
        @example_times = Hash.new(0)
      end

      def before_feature(_)
        @start_at = ParallelTests.now.to_f
      end

      def after_feature(feature)
        @example_times[feature.file] += ParallelTests.now.to_f - @start_at
      end

      def after_features(*args)
        lock_output do
          @io.puts @example_times.map { |file, time| "#{file}:#{time}" }
        end
      end
    end
  end
end

Version data entries

45 entries across 45 versions & 1 rubygems

Version Path
parallel_tests-2.14.0 lib/parallel_tests/gherkin/runtime_logger.rb
parallel_tests-2.13.0 lib/parallel_tests/gherkin/runtime_logger.rb
parallel_tests-2.12.0 lib/parallel_tests/gherkin/runtime_logger.rb
parallel_tests-2.11.0 lib/parallel_tests/gherkin/runtime_logger.rb
parallel_tests-2.10.0 lib/parallel_tests/gherkin/runtime_logger.rb
parallel_tests-2.9.0 lib/parallel_tests/gherkin/runtime_logger.rb
parallel_tests-2.8.0 lib/parallel_tests/gherkin/runtime_logger.rb
parallel_tests-2.7.1 lib/parallel_tests/gherkin/runtime_logger.rb
parallel_tests-2.7.0 lib/parallel_tests/gherkin/runtime_logger.rb
parallel_tests-2.6.0 lib/parallel_tests/gherkin/runtime_logger.rb
parallel_tests-2.5.0 lib/parallel_tests/gherkin/runtime_logger.rb
parallel_tests-2.4.1 lib/parallel_tests/gherkin/runtime_logger.rb
parallel_tests-2.4.0 lib/parallel_tests/gherkin/runtime_logger.rb
parallel_tests-2.3.1 lib/parallel_tests/gherkin/runtime_logger.rb
parallel_tests-2.3.0 lib/parallel_tests/gherkin/runtime_logger.rb
parallel_tests-2.2.2 lib/parallel_tests/gherkin/runtime_logger.rb
parallel_tests-2.2.1 lib/parallel_tests/gherkin/runtime_logger.rb
parallel_tests-2.2.0 lib/parallel_tests/gherkin/runtime_logger.rb
parallel_tests-2.1.2 lib/parallel_tests/gherkin/runtime_logger.rb
parallel_tests-2.1.1 lib/parallel_tests/gherkin/runtime_logger.rb