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.25.0 lib/parallel_tests/gherkin/runtime_logger.rb
parallel_tests-2.24.0 lib/parallel_tests/gherkin/runtime_logger.rb
parallel_tests-2.23.0 lib/parallel_tests/gherkin/runtime_logger.rb
parallel_tests-2.22.1 lib/parallel_tests/gherkin/runtime_logger.rb
parallel_tests-2.22.0 lib/parallel_tests/gherkin/runtime_logger.rb
parallel_tests-2.21.3 lib/parallel_tests/gherkin/runtime_logger.rb
parallel_tests-2.21.2 lib/parallel_tests/gherkin/runtime_logger.rb
parallel_tests-2.21.1 lib/parallel_tests/gherkin/runtime_logger.rb
parallel_tests-2.21.0 lib/parallel_tests/gherkin/runtime_logger.rb
parallel_tests-2.20.0 lib/parallel_tests/gherkin/runtime_logger.rb
parallel_tests-2.19.0 lib/parallel_tests/gherkin/runtime_logger.rb
parallel_tests-2.18.0 lib/parallel_tests/gherkin/runtime_logger.rb
parallel_tests-2.17.1 lib/parallel_tests/gherkin/runtime_logger.rb
parallel_tests-2.17.0 lib/parallel_tests/gherkin/runtime_logger.rb
parallel_tests-2.16.1 lib/parallel_tests/gherkin/runtime_logger.rb
parallel_tests-2.16.0 lib/parallel_tests/gherkin/runtime_logger.rb
parallel_tests-2.15.0 lib/parallel_tests/gherkin/runtime_logger.rb
parallel_tests-2.14.3 lib/parallel_tests/gherkin/runtime_logger.rb
parallel_tests-2.14.2 lib/parallel_tests/gherkin/runtime_logger.rb
parallel_tests-2.14.1 lib/parallel_tests/gherkin/runtime_logger.rb