diff --git a/Changelog.md b/Changelog.md index efd9869fb..0f84f68d1 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,3 +1,10 @@ +# v0.11.28 + +* Change to report efficiency instead of overhead. + Efficiency is defined by `killtime / runtime`. + + [#1415](https://github.com/mbj/mutant/pull/1415) + # v0.11.27 2023-12-01 * [#1414](https://github.com/mbj/mutant/pull/1414) diff --git a/lib/mutant/reporter/cli/printer/env_progress.rb b/lib/mutant/reporter/cli/printer/env_progress.rb index a3e8bf804..d4e3d9cdc 100644 --- a/lib/mutant/reporter/cli/printer/env_progress.rb +++ b/lib/mutant/reporter/cli/printer/env_progress.rb @@ -14,7 +14,6 @@ class EnvProgress < self :coverage, :env, :killtime, - :overhead, :runtime ) @@ -25,7 +24,7 @@ class EnvProgress < self [:info, 'Timeouts: %s', :amount_timeouts ], [:info, 'Runtime: %0.2fs', :runtime ], [:info, 'Killtime: %0.2fs', :killtime ], - [:info, 'Overhead: %0.2f%%', :overhead_percent ], + [:info, 'Efficiency: %0.2f%%', :efficiency_percent ], [:info, 'Mutations/s: %0.2f', :mutations_per_second ], [:status, 'Coverage: %0.2f%%', :coverage_percent ] ].each(&:freeze) @@ -50,8 +49,8 @@ def coverage_percent coverage * 100 end - def overhead_percent - (overhead / killtime) * 100 + def efficiency_percent + (killtime / runtime) * 100 end end # EnvProgress end # Printer diff --git a/lib/mutant/reporter/cli/printer/status_progressive.rb b/lib/mutant/reporter/cli/printer/status_progressive.rb index 862d4a7e5..465f34931 100644 --- a/lib/mutant/reporter/cli/printer/status_progressive.rb +++ b/lib/mutant/reporter/cli/printer/status_progressive.rb @@ -14,7 +14,6 @@ class StatusProgressive < self :amount_mutations_alive, :amount_mutations_killed, :killtime, - :overhead, :runtime ) diff --git a/lib/mutant/result.rb b/lib/mutant/result.rb index f701210fa..b6dd11dd9 100644 --- a/lib/mutant/result.rb +++ b/lib/mutant/result.rb @@ -50,17 +50,6 @@ def delegate(name, target) private_constant(*constants(false)) - # Mutant overhead running mutatet tests - # - # This is NOT the overhead of mutation testing, just an engine specific - # measurement for the efficiency of the parallelization engine, kill - # isolation etc. - # - # @return [Float] - def overhead - runtime - killtime - end - # Hook called when module gets included # # @param [Class, Module] host diff --git a/spec/unit/mutant/reporter/cli/printer/env_progress_spec.rb b/spec/unit/mutant/reporter/cli/printer/env_progress_spec.rb index 449b89544..a66a26b0a 100644 --- a/spec/unit/mutant/reporter/cli/printer/env_progress_spec.rb +++ b/spec/unit/mutant/reporter/cli/printer/env_progress_spec.rb @@ -29,7 +29,7 @@ Timeouts: 0 Runtime: 4.00s Killtime: 0.00s - Overhead: Inf% + Efficiency: 0.00% Mutations/s: 0.00 Coverage: 100.00% STR @@ -56,7 +56,7 @@ Timeouts: 0 Runtime: 4.00s Killtime: 2.00s - Overhead: 100.00% + Efficiency: 50.00% Mutations/s: 0.50 Coverage: 100.00% STR @@ -85,7 +85,7 @@ Timeouts: 0 Runtime: 4.00s Killtime: 2.00s - Overhead: 100.00% + Efficiency: 50.00% Mutations/s: 0.50 Coverage: 50.00% STR diff --git a/spec/unit/mutant/reporter/cli/printer/env_result_spec.rb b/spec/unit/mutant/reporter/cli/printer/env_result_spec.rb index 4ae5cb73e..28ca9e72a 100644 --- a/spec/unit/mutant/reporter/cli/printer/env_result_spec.rb +++ b/spec/unit/mutant/reporter/cli/printer/env_result_spec.rb @@ -36,7 +36,7 @@ Timeouts: 0 Runtime: 4.00s Killtime: 2.00s - Overhead: 100.00% + Efficiency: 50.00% Mutations/s: 0.50 Coverage: 50.00% STR diff --git a/spec/unit/mutant/reporter/cli_spec.rb b/spec/unit/mutant/reporter/cli_spec.rb index 0714456a5..e34a6d493 100644 --- a/spec/unit/mutant/reporter/cli_spec.rb +++ b/spec/unit/mutant/reporter/cli_spec.rb @@ -99,7 +99,7 @@ def self.it_reports(expected_content) Timeouts: 0 Runtime: 4.00s Killtime: 2.00s - Overhead: 100.00% + Efficiency: 50.00% Mutations/s: 0.50 Coverage: 100.00% REPORT diff --git a/spec/unit/mutant/result_spec.rb b/spec/unit/mutant/result_spec.rb index 4039711f3..a1b6f8eab 100644 --- a/spec/unit/mutant/result_spec.rb +++ b/spec/unit/mutant/result_spec.rb @@ -22,12 +22,4 @@ def collection expect(object.length).to be(1) end end - - describe '#overhead' do - subject { object.overhead } - - it 'returns difference between runtime and killtime' do - should eql(2.0) - end - end end