mutant 0.11.27 → 0.11.28

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 594919332bf75ff59d19206e356cc568d4b59c859dd2d6eccc459805e3445cf3
4
- data.tar.gz: c8e919b4826b6596c51ce26c8ca2eda5ff19e50bc1e8ff785b48ab479e6ad42f
3
+ metadata.gz: 2580053028745a106b883c1468b4e0c4462d1e5e443f12533ca277149f603239
4
+ data.tar.gz: db5d4f28324b0846a9872b3a7b841e8dcdb84ae204f6c15def9f9381db064ea3
5
5
  SHA512:
6
- metadata.gz: e0e91da3e7ed933633c00ba849f502df74bff6407afaed8f2f7bfe167efb4d100bf89eac7ea4f7cf3872a2b257a0093d0c359956f01ea4365f870fd1ce731132
7
- data.tar.gz: ed1f39b700889360dd049edd5dc00391fc978b7be64cf3f0662e890d39a9b8b1b2001f6df3291b3760e9866f48efc32b344b84ded8d94921ad12a29e089bc748
6
+ metadata.gz: 125e846599d5bfbd7ec52d3f7bbcf78f53d2584b7dd447d9313954c10ff4e5176c59fec396833b97f81bcb4bb40d9fdcf1cc0ef138c3a53685af503b0f95678b
7
+ data.tar.gz: 2fb0163bfcdc01ed03fb34418a9522af0dab49e4fb8fa91cccf8c9e7cbbdcbd00551e2c36087ca8ee587bda317cc391a0bf7eae564be7834b53eff96873abd55
@@ -56,6 +56,10 @@ module Mutant
56
56
  set(matcher: @config.matcher.add(attribute, value))
57
57
  end
58
58
 
59
+ def effective_options
60
+ instance_of?(Environment) ? EMPTY_ARRAY : super()
61
+ end
62
+
59
63
  # rubocop:disable Metrics/MethodLength
60
64
  def add_environment_options(parser)
61
65
  parser.separator('Environment:')
@@ -6,7 +6,7 @@ module Mutant
6
6
  class Command
7
7
  include AbstractType, Anima.new(
8
8
  :main,
9
- :parent,
9
+ :parent_names,
10
10
  :print_profile,
11
11
  :world,
12
12
  :zombie
@@ -27,10 +27,10 @@ module Mutant
27
27
  # @return [Command]
28
28
  #
29
29
  # rubocop:disable Metrics/ParameterLists
30
- def self.parse(arguments:, parent: nil, print_profile: false, world:, zombie: false)
30
+ def self.parse(arguments:, parent_names: nil, print_profile: false, world:, zombie: false)
31
31
  new(
32
32
  main: nil,
33
- parent: parent,
33
+ parent_names: parent_names,
34
34
  print_profile: print_profile,
35
35
  world: world,
36
36
  zombie: zombie
@@ -63,7 +63,7 @@ module Mutant
63
63
  #
64
64
  # @return [String]
65
65
  def full_name
66
- [*parent&.full_name, self.class.command_name].join(' ')
66
+ [*parent_names, self.class.command_name].join(' ')
67
67
  end
68
68
 
69
69
  alias_method :print_profile?, :print_profile
@@ -97,13 +97,17 @@ module Mutant
97
97
  add_global_options(parser)
98
98
  add_subcommands(parser)
99
99
 
100
- self.class::OPTIONS.each do |method_name|
100
+ effective_options.each do |method_name|
101
101
  2.times { parser.separator(nil) }
102
102
  __send__(method_name, parser)
103
103
  end
104
104
  end
105
105
  end
106
106
 
107
+ def effective_options
108
+ self.class::OPTIONS
109
+ end
110
+
107
111
  def capture_main(&block)
108
112
  @main = block
109
113
  end
@@ -189,7 +193,7 @@ module Mutant
189
193
  find_command(command_name).bind do |command|
190
194
  command.parse(
191
195
  arguments: arguments,
192
- parent: self,
196
+ parent_names: [*parent_names, self.class::NAME],
193
197
  print_profile: print_profile,
194
198
  world: world,
195
199
  zombie: zombie
@@ -15,6 +15,8 @@ module Mutant
15
15
  def self.run_mutation_analysis(env)
16
16
  reporter = reporter(env)
17
17
 
18
+ env.world.process_warmup
19
+
18
20
  env
19
21
  .record(:analysis) { run_driver(reporter, async_driver(env)) }
20
22
  .tap { |result| env.record(:report) { reporter.report(result) } }
@@ -36,7 +36,9 @@ module Mutant
36
36
  private
37
37
 
38
38
  def dispatch
39
- emit_key_mutations
39
+ emit_key_mutations do |mutation|
40
+ !mutation.eql?(s(:nil))
41
+ end
40
42
  emit_value_mutations
41
43
  end
42
44
 
@@ -14,7 +14,6 @@ module Mutant
14
14
  :coverage,
15
15
  :env,
16
16
  :killtime,
17
- :overhead,
18
17
  :runtime
19
18
  )
20
19
 
@@ -25,7 +24,7 @@ module Mutant
25
24
  [:info, 'Timeouts: %s', :amount_timeouts ],
26
25
  [:info, 'Runtime: %0.2fs', :runtime ],
27
26
  [:info, 'Killtime: %0.2fs', :killtime ],
28
- [:info, 'Overhead: %0.2f%%', :overhead_percent ],
27
+ [:info, 'Efficiency: %0.2f%%', :efficiency_percent ],
29
28
  [:info, 'Mutations/s: %0.2f', :mutations_per_second ],
30
29
  [:status, 'Coverage: %0.2f%%', :coverage_percent ]
31
30
  ].each(&:freeze)
@@ -50,8 +49,8 @@ module Mutant
50
49
  coverage * 100
51
50
  end
52
51
 
53
- def overhead_percent
54
- (overhead / killtime) * 100
52
+ def efficiency_percent
53
+ (killtime / runtime) * 100
55
54
  end
56
55
  end # EnvProgress
57
56
  end # Printer
@@ -14,7 +14,6 @@ module Mutant
14
14
  :amount_mutations_alive,
15
15
  :amount_mutations_killed,
16
16
  :killtime,
17
- :overhead,
18
17
  :runtime
19
18
  )
20
19
 
data/lib/mutant/result.rb CHANGED
@@ -50,17 +50,6 @@ module Mutant
50
50
 
51
51
  private_constant(*constants(false))
52
52
 
53
- # Mutant overhead running mutatet tests
54
- #
55
- # This is NOT the overhead of mutation testing, just an engine specific
56
- # measurement for the efficiency of the parallelization engine, kill
57
- # isolation etc.
58
- #
59
- # @return [Float]
60
- def overhead
61
- runtime - killtime
62
- end
63
-
64
53
  # Hook called when module gets included
65
54
  #
66
55
  # @param [Class, Module] host
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Mutant
4
4
  # Current mutant version
5
- VERSION = '0.11.27'
5
+ VERSION = '0.11.28'
6
6
  end # Mutant
data/lib/mutant/world.rb CHANGED
@@ -82,5 +82,9 @@ module Mutant
82
82
  def record(name, &block)
83
83
  recorder.record(name, &block)
84
84
  end
85
+
86
+ def process_warmup
87
+ process.warmup if process.respond_to?(:warmup)
88
+ end
85
89
  end # World
86
90
  end # Mutant
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mutant
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.27
4
+ version: 0.11.28
5
5
  platform: ruby
6
6
  authors:
7
7
  - Markus Schirp
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-01-10 00:00:00.000000000 Z
11
+ date: 2024-02-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: diff-lcs