mutant 0.11.26 → 0.11.28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7cfde1fc6bf867efdfcaada6e39b084ba28089999da9d3f0c6f68a684f6cce35
4
- data.tar.gz: 66c43239c831af01f5ff2d9e4fafcaf1f7aaacb29b5bedc47ac859b6e7044aff
3
+ metadata.gz: 2580053028745a106b883c1468b4e0c4462d1e5e443f12533ca277149f603239
4
+ data.tar.gz: db5d4f28324b0846a9872b3a7b841e8dcdb84ae204f6c15def9f9381db064ea3
5
5
  SHA512:
6
- metadata.gz: a2774dfb906a30402f3a6160bca215a5bfaee671035376406f9858368720a1eacda1237c3cd0794c824c5abd9347cdf8f04ead80b878063a0cadc61c5c044270
7
- data.tar.gz: 796f8625453e50727e76359e5513cef8f1121dc9166dbb3bc7b4ec7a33114fa08c00b41dddd42f8a6f4dc36cde0a4ff6fd8813309bda54dda81dfaa825fe32c7
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
 
@@ -206,6 +206,7 @@ module Mutant
206
206
  emit(receiver) if receiver && !left_op_assignment?
207
207
  end
208
208
 
209
+ # rubocop:disable Style/HashEachMethods - its not a hash ;)
209
210
  def mutate_arguments
210
211
  emit_type(receiver, selector)
211
212
  remaining_children_with_index.each do |_node, index|
@@ -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.26'
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.26
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: 2023-12-02 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
@@ -30,20 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 3.2.2
34
- - - ">="
35
- - !ruby/object:Gem::Version
36
- version: 3.2.2.4
33
+ version: 3.3.0
37
34
  type: :runtime
38
35
  prerelease: false
39
36
  version_requirements: !ruby/object:Gem::Requirement
40
37
  requirements:
41
38
  - - "~>"
42
39
  - !ruby/object:Gem::Version
43
- version: 3.2.2
44
- - - ">="
45
- - !ruby/object:Gem::Version
46
- version: 3.2.2.4
40
+ version: 3.3.0
47
41
  - !ruby/object:Gem::Dependency
48
42
  name: regexp_parser
49
43
  requirement: !ruby/object:Gem::Requirement
@@ -380,7 +374,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
380
374
  - !ruby/object:Gem::Version
381
375
  version: '0'
382
376
  requirements: []
383
- rubygems_version: 3.4.10
377
+ rubygems_version: 3.5.3
384
378
  signing_key:
385
379
  specification_version: 4
386
380
  summary: ''