Class: Evilution::Runner::MutationExecutor::Strategy::Parallel Private
- Inherits:
-
Object
- Object
- Evilution::Runner::MutationExecutor::Strategy::Parallel
- Defined in:
- lib/evilution/runner/mutation_executor/strategy/parallel.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Constant Summary collapse
- DIED_COMPACT =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
Compact result for a worker that exited unexpectedly (:error is not cached, so the 0.0 duration is never persisted).
{ status: :error, duration: 0.0, error_message: "worker process exited unexpectedly", error_class: "Evilution::Error" }.freeze
Instance Method Summary collapse
- #call(mutations, baseline_result:, integration:) ⇒ Object private
-
#initialize(cache:, isolator:, packer:, pipeline:, notifier:, pool_factory:, config:, diagnostics: nil) ⇒ Parallel
constructor
private
A new instance of Parallel.
Constructor Details
#initialize(cache:, isolator:, packer:, pipeline:, notifier:, pool_factory:, config:, diagnostics: nil) ⇒ Parallel
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Parallel.
16 17 18 19 20 21 22 23 24 25 |
# File 'lib/evilution/runner/mutation_executor/strategy/parallel.rb', line 16 def initialize(cache:, isolator:, packer:, pipeline:, notifier:, pool_factory:, config:, diagnostics: nil) @cache = cache @isolator = isolator @packer = packer @pipeline = pipeline @notifier = notifier @pool_factory = pool_factory @diagnostics = diagnostics @config = config end |
Instance Method Details
#call(mutations, baseline_result:, integration:) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
27 28 29 30 31 32 33 34 35 36 |
# File 'lib/evilution/runner/mutation_executor/strategy/parallel.rb', line 27 def call(mutations, baseline_result:, integration:) @notifier.start(mutations.length) pool = @pool_factory.call state = { results: [], truncated: false, completed: 0 } all_worker_stats = run_batches(mutations, pool, baseline_result, integration, state) log_worker_diagnostics(all_worker_stats) @notifier.finish build_result(state) end |