Sha256: f48d6b206f9ed1a92d950a530b93fea1015e809d39c9f910fe384e766783daee

Contents?: true

Size: 1.1 KB

Versions: 7

Compression:

Stored size: 1.1 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 = '(%02d/%02d) %3d%% - killtime: %0.02fs runtime: %0.02fs overhead: %0.02fs'.freeze

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

          # Run printer
          #
          # @return [undefined]
          def run
            status(
              FORMAT,
              amount_mutations_killed,
              amount_mutations,
              coverage * 100,
              killtime,
              runtime,
              overhead
            )
          end

        private

          # Object being printed
          #
          # @return [Result::Env]
          def object
            super().payload
          end
        end # StatusProgressive
      end # Printer
    end # CLI
  end # Reporter
end # Mutant

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
mutant-0.8.23 lib/mutant/reporter/cli/printer/status_progressive.rb
mutant-0.8.22 lib/mutant/reporter/cli/printer/status_progressive.rb
mutant-0.8.21 lib/mutant/reporter/cli/printer/status_progressive.rb
mutant-0.8.20 lib/mutant/reporter/cli/printer/status_progressive.rb
mutant-0.8.19 lib/mutant/reporter/cli/printer/status_progressive.rb
mutant-0.8.18 lib/mutant/reporter/cli/printer/status_progressive.rb
mutant-0.8.17 lib/mutant/reporter/cli/printer/status_progressive.rb