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
650 stars 402 forks source link

Allow to skip start and end scripts even when they are defined #331

Closed aklenik closed 5 years ago

aklenik commented 5 years ago

Context

This issue is a rework of #329.

During the development of user callback or chaincodes, it would be nice to reuse an already started (through the start script) local network. Currently, we need to remove the start script from the network configuration file to achieve this.

Also, during the debugging of an error, it would be nice to keep the network running at the end of a benchmark to inspect the logs, for example. Currently, we need to remove the end script from the network configuration file to achieve this.

Expected Behavior

Provide a mechanism to skip the start and/or end scripts even when they are present in the configuration.

Actual Behavior

Currently, we need to remove the start/end scripts from the network configuration file.

Possible Fix

Caliper already provides a flexible configuration mechanism. Two options should be added to the general Caliper configuration file (config/default.yaml):

core:
    skipStartScript: false
    skipEndScript: false

This way the settings can be easily overridden through environment variables or command line arguments.

Finally, this and this line should be changed to take the settings into account.

Existing issues

feihujiang commented 5 years ago

:+1:

panyu4 commented 5 years ago

Since this issue had been resolved, it will be closed.