Sha256: ca541db41bab69a8c396e2552c4620d3b218051a4862f9cd921253f6de976de7

Contents?: true

Size: 1.16 KB

Versions: 68

Compression:

Stored size: 1.16 KB

Contents

# frozen_string_literal: true

module Mutant
  class Reporter
    class CLI
      class Printer
        # Reporter for progressive output format on scheduler Status objects
        class StatusProgressive < self
          FORMAT = 'progress: %02d/%02d alive: %d runtime: %0.02fs killtime: %0.02fs mutations/s: %0.02f'

          delegate(
            :amount_mutation_results,
            :amount_mutations,
            :amount_mutations_alive,
            :amount_mutations_killed,
            :killtime,
            :overhead,
            :runtime
          )

          # Run printer
          #
          # @return [undefined]
          def run
            status(
              FORMAT,
              amount_mutation_results,
              amount_mutations,
              amount_mutations_alive,
              runtime,
              killtime,
              mutations_per_second
            )
          end

        private

          def object
            super().payload
          end

          def mutations_per_second
            amount_mutation_results / runtime
          end
        end # StatusProgressive
      end # Printer
    end # CLI
  end # Reporter
end # Mutant

Version data entries

68 entries across 68 versions & 1 rubygems

Version Path
mutant-0.11.27 lib/mutant/reporter/cli/printer/status_progressive.rb
mutant-0.11.26 lib/mutant/reporter/cli/printer/status_progressive.rb
mutant-0.11.25 lib/mutant/reporter/cli/printer/status_progressive.rb
mutant-0.11.24 lib/mutant/reporter/cli/printer/status_progressive.rb
mutant-0.11.23 lib/mutant/reporter/cli/printer/status_progressive.rb
mutant-0.11.22 lib/mutant/reporter/cli/printer/status_progressive.rb
mutant-0.11.21 lib/mutant/reporter/cli/printer/status_progressive.rb
mutant-0.11.20 lib/mutant/reporter/cli/printer/status_progressive.rb
mutant-0.11.19 lib/mutant/reporter/cli/printer/status_progressive.rb
mutant-0.11.18 lib/mutant/reporter/cli/printer/status_progressive.rb
mutant-0.11.17 lib/mutant/reporter/cli/printer/status_progressive.rb
mutant-0.11.16 lib/mutant/reporter/cli/printer/status_progressive.rb
mutant-0.11.15 lib/mutant/reporter/cli/printer/status_progressive.rb
mutant-0.11.14 lib/mutant/reporter/cli/printer/status_progressive.rb
mutant-0.11.13 lib/mutant/reporter/cli/printer/status_progressive.rb
mutant-0.11.12 lib/mutant/reporter/cli/printer/status_progressive.rb
mutant-0.11.11 lib/mutant/reporter/cli/printer/status_progressive.rb
mutant-0.11.10 lib/mutant/reporter/cli/printer/status_progressive.rb
mutant-0.11.9 lib/mutant/reporter/cli/printer/status_progressive.rb
mutant-0.11.8 lib/mutant/reporter/cli/printer/status_progressive.rb