Sha256: a63ff2231e6c40353b6bcc53a640cb14f42ed7d6e3896cecab47d7629f8f4d62

Contents?: true

Size: 615 Bytes

Versions: 24

Compression:

Stored size: 615 Bytes

Contents

module DeepTest
  module Distributed
    class ThroughputStatistics
      attr_reader :test_count, :start_time, :end_time

      def initialize(test_count, start_time, end_time)
        @test_count, @start_time, @end_time = test_count, start_time, end_time
      end

      def timespan_in_seconds
        @end_time.to_f - @start_time.to_f
      end

      def tests_per_second
        @test_count / timespan_in_seconds
      end

      def summary
        <<-end_summary
#{test_count} tests run in #{timespan_in_seconds} seconds
(#{tests_per_second} tests / second)
        end_summary
      end
    end
  end
end

Version data entries

24 entries across 24 versions & 4 rubygems

Version Path
jason-o-matic-deep_test-1.2.2.1 lib/deep_test/distributed/throughput_statistics.rb
jason-o-matic-deep_test-1.2.2.10 lib/deep_test/distributed/throughput_statistics.rb
jason-o-matic-deep_test-1.2.2.11 lib/deep_test/distributed/throughput_statistics.rb
jason-o-matic-deep_test-1.2.2.12 lib/deep_test/distributed/throughput_statistics.rb
jason-o-matic-deep_test-1.2.2.13 lib/deep_test/distributed/throughput_statistics.rb
jason-o-matic-deep_test-1.2.2.14 lib/deep_test/distributed/throughput_statistics.rb
jason-o-matic-deep_test-1.2.2.2 lib/deep_test/distributed/throughput_statistics.rb
jason-o-matic-deep_test-1.2.2.3 lib/deep_test/distributed/throughput_statistics.rb
jason-o-matic-deep_test-1.2.2.4 lib/deep_test/distributed/throughput_statistics.rb
jason-o-matic-deep_test-1.2.2.5 lib/deep_test/distributed/throughput_statistics.rb
jason-o-matic-deep_test-1.2.2.6 lib/deep_test/distributed/throughput_statistics.rb
jason-o-matic-deep_test-1.2.2.7 lib/deep_test/distributed/throughput_statistics.rb
jason-o-matic-deep_test-1.2.2.8 lib/deep_test/distributed/throughput_statistics.rb
jason-o-matic-deep_test-1.2.2.9 lib/deep_test/distributed/throughput_statistics.rb
jperkins-deep_test-1.2.2 lib/deep_test/distributed/throughput_statistics.rb
jason-o-matic-deep_test-1.2.2.15 lib/deep_test/distributed/throughput_statistics.rb
jstorimer-deep-test-1.4.0 lib/deep_test/distributed/throughput_statistics.rb
jstorimer-deep-test-1.3.0 lib/deep_test/distributed/throughput_statistics.rb
jstorimer-deep-test-1.2.0 lib/deep_test/distributed/throughput_statistics.rb
jstorimer-deep-test-1.1.0 lib/deep_test/distributed/throughput_statistics.rb