Skip to content

Commit

Permalink
Add Ruby-3.3 Process.warmup
Browse files Browse the repository at this point in the history
  • Loading branch information
mbj committed Jan 10, 2024
1 parent 403b31e commit c14a1d1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# v0.11.27

* [#1413](https://github.com/mbj/mutant/pull/1413)

Add `Process.warmup` optimization for ruby-3.3+ which yields a noticable speed improvement.

# v0.11.26 2023-12-01

* [#1409](https://github.com/mbj/mutant/pull/1409)
Expand Down
6 changes: 6 additions & 0 deletions lib/mutant/mutation/runner.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ def self.call(env)
def self.run_mutation_analysis(env)
reporter = reporter(env)

warmup

env
.record(:analysis) { run_driver(reporter, async_driver(env)) }
.tap { |result| env.record(:report) { reporter.report(result) } }
Expand Down Expand Up @@ -52,6 +54,10 @@ def self.mutation_test_config(env)
end
private_class_method :mutation_test_config

def self.warmup
Process.warmup if Process.respond_to?(:warmup)
end

def self.reporter(env)
env.config.reporter
end
Expand Down

0 comments on commit c14a1d1

Please sign in to comment.