datastax / cstar_perf

Apache Cassandra performance testing platform
Apache License 2.0
72 stars 34 forks source link

CSTAR-633, CSTAR-638, CSTAR-639 #241

Closed csplinter closed 8 years ago

csplinter commented 8 years ago

Covered in this PR:

CSTAR-633: Add git_fetch_before_test to stress_compare.py This allows for a user to set "git_fetch_before_test" in cluster_config.json. If this is False, then cassandra.git and each stress branch will not be fetched before the stress run. This is used to save time if you only wish to use the default stress revision shipped with cassandra. In the HP case, our internet connection was very slow and this process was taking significant time.

CSTAR-638: Add bootstrap_before_test to stress_compare.py This allows for a user to set "bootstrap_before_test" in stress_config.json under the revision section. If this is False, DSE / Cassandra will not be bootstrapped before the first operation. This is useful if you have already installed and configured DSE / Cassandra via cstar_perf_bootstrap.

CSTAR-639: Add teardown_after_test to stress_compare.py This allows for a user to set "teardown_after_test" in stress_config.json under the revision section. If this is False, DSE / Cassandra will not be destroyed and shut down after all operations. This is useful if you want to keep your instance running after a test.

util.get_bool_if_method_and_config_values_do_not_conflict In several places we had this code for getting / checking boolean values from a json config file

if initial_destroy == True and pristine_config.get('initial_destroy', None) == False:
    raise ValueError('setting for initial_destroy conflicts in job config and stress_compare() call')
else:
    initial_destroy = bool(distutils.util.strtobool(str(pristine_config.get('initial_destroy', initial_destroy))))

We now make a call to a single method

initial_destroy = get_bool_if_method_and_config_values_do_not_conflict('initial_destroy', initial_destroy, pristine_config, method_name='stress_compare')
csplinter commented 8 years ago

@nastra would you mind reviewing?

nastra commented 8 years ago

+1 based on the code but I haven't tried running it