hyperledger / caliper

A blockchain benchmark framework to measure performance of multiple blockchain solutions https://wiki.hyperledger.org/display/caliper
https://hyperledger.github.io/caliper/
Apache License 2.0
651 stars 404 forks source link

Terminate workers if caliper manager is terminated prematurely #1514

Closed davidkel closed 7 months ago

davidkel commented 7 months ago

Caliper can run workers in multiple ways. THe most common is when they are part of the Caliper manager process, however when they are separate processes either on the same machine or remote machines, if the caliper manager is terminated unexpectedly (eg CTRL-C) then those workers still continue to drive load. We would want those workers to terminate as well. This change facilitates this by detecting if the manager is terminated prematurely and sending requests to the workers to terminate

This is a resubmitted PR of a collaboration between myself and @captainIRS (#1435 )

Signed-off-by: Dave Kelsey d_kelsey@uk.ibm.com

codecov[bot] commented 7 months ago

Codecov Report

Attention: 5 lines in your changes are missing coverage. Please review.

Comparison is base (8cef10c) 55.89% compared to head (d7f86e9) 55.85%.

Files Patch % Lines
...re/lib/manager/orchestrators/round-orchestrator.js 0.00% 3 Missing :warning:
...ackages/caliper-core/lib/manager/caliper-engine.js 0.00% 1 Missing and 1 partial :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1514 +/- ## ========================================== - Coverage 55.89% 55.85% -0.04% ========================================== Files 105 105 Lines 4507 4510 +3 Branches 688 689 +1 ========================================== Hits 2519 2519 - Misses 1435 1437 +2 - Partials 553 554 +1 ``` | [Flag](https://app.codecov.io/gh/hyperledger/caliper/pull/1514/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=hyperledger) | Coverage Δ | | |---|---|---| | [caliper-core](https://app.codecov.io/gh/hyperledger/caliper/pull/1514/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=hyperledger) | `44.94% <0.00%> (-0.05%)` | :arrow_down: | | [caliper-fabric](https://app.codecov.io/gh/hyperledger/caliper/pull/1514/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=hyperledger) | `80.46% <ø> (ø)` | | | [generator-caliper](https://app.codecov.io/gh/hyperledger/caliper/pull/1514/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=hyperledger) | `83.62% <ø> (ø)` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=hyperledger#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.