Sha256: b16160ff5f58498441f036c385fd558275a588090667a650a95eb4555b5cf23b

Contents?: true

Size: 1.07 KB

Versions: 8

Compression:

Stored size: 1.07 KB

Contents

module Mutest
  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 # Mutest

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
mutest-0.0.9 lib/mutest/reporter/cli/printer/status_progressive.rb
mutest-0.0.8 lib/mutest/reporter/cli/printer/status_progressive.rb
mutest-0.0.7 lib/mutest/reporter/cli/printer/status_progressive.rb
mutest-0.0.6 lib/mutest/reporter/cli/printer/status_progressive.rb
mutest-0.0.5 lib/mutest/reporter/cli/printer/status_progressive.rb
mutest-0.0.4 lib/mutest/reporter/cli/printer/status_progressive.rb
mutest-0.0.3 lib/mutest/reporter/cli/printer/status_progressive.rb
mutest-0.0.2 lib/mutest/reporter/cli/printer/status_progressive.rb