Skip to content

Commit 7a702c7

Browse files
dimakrfruch
authored andcommitted
improvement(test-stages): add skip test stages option for perf tests
Add possibility to skip selected set of performance test stages.
1 parent 9b54d48 commit 7a702c7

6 files changed

+13
-3
lines changed

configurations/skip_test_stages.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,5 @@ skip_test_stages:
55
post_test_load: false
66
nemesis: false
77
data_validation: false
8+
perf_preload_data: false
9+
perf_steady_state_calc: false

docs/skip-test-stages.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ For the moment, the following test stages can be skipped:
1616
- post_test_load
1717
- nemesis
1818
- data_validation
19+
- perf_preload_data: false
20+
- perf_steady_state_calc: false
1921

2022
### Configuration
2123

performance_regression_alternator_test.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
from performance_regression_test import PerformanceRegressionTest
1717
from sdcm.sct_events.group_common_events import ignore_operation_errors, ignore_alternator_client_errors
1818
from sdcm.utils import alternator
19+
from sdcm.utils.decorators import optional_stage
1920

2021

2122
class PerformanceRegressionAlternatorTest(PerformanceRegressionTest):
@@ -68,6 +69,7 @@ def create_cql_ks_and_table(self, field_number):
6869
y_id varchar primary key,
6970
{fields});""")
7071

72+
@optional_stage('perf_preload_data')
7173
def preload_data(self, compaction_strategy=None):
7274
# if test require a pre-population of data
7375
prepare_write_cmd = self.params.get('prepare_write_cmd')

performance_regression_gradual_grow_throughput.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
from typing import NamedTuple
88

99
from performance_regression_test import PerformanceRegressionTest
10+
from sdcm.utils.common import skip_optional_stage
1011
from sdcm.sct_events import Severity
1112
from sdcm.sct_events.system import TestFrameworkEvent
1213
from sdcm.results_analyze import PredefinedStepsTestPerformanceAnalyzer
@@ -115,7 +116,7 @@ def _base_test_workflow(self, workload: Workload, test_name):
115116
num_loaders = len(self.loaders.nodes)
116117
self.run_fstrim_on_all_db_nodes()
117118
# run a write workload as a preparation
118-
if workload.preload_data:
119+
if workload.preload_data and not skip_optional_stage('perf_preload_data'):
119120
self.preload_data()
120121
self.wait_no_compactions_running(n=400, sleep_time=120)
121122
self.run_fstrim_on_all_db_nodes()

performance_regression_row_level_repair_test.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
import six
2020

2121
from sdcm.tester import ClusterTester
22-
from sdcm.utils.decorators import measure_time, retrying
22+
from sdcm.utils.decorators import measure_time, retrying, optional_stage
2323
from test_lib.scylla_bench_tools import create_scylla_bench_table_query
2424

2525
THOUSAND = 1000
@@ -63,6 +63,7 @@ def _update_cl_in_stress_cmd(self, str_stress_cmd, consistency_level):
6363
self.log.debug("Could not find a 'cl' parameter in stress command: {}".format(str_stress_cmd))
6464
return str_stress_cmd
6565

66+
@optional_stage('perf_preload_data')
6667
def preload_data(self, consistency_level=None):
6768
# if test require a pre-population of data
6869

performance_regression_test.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
from sdcm.sct_events.filters import EventsSeverityChangerFilter
2929
from sdcm.sct_events.loaders import CassandraStressEvent
3030
from sdcm.sct_events.system import HWPerforanceEvent, InfoEvent
31-
from sdcm.utils.decorators import log_run_info, latency_calculator_decorator
31+
from sdcm.utils.decorators import log_run_info, latency_calculator_decorator, optional_stage
3232
from sdcm.utils.csrangehistogram import CSHistogramTagTypes
3333
from sdcm.utils.nemesis_utils.indexes import wait_for_view_to_be_built
3434

@@ -218,6 +218,7 @@ def _stop_load_when_nemesis_threads_end(self):
218218
extra_time_to_expiration=60):
219219
self.loaders.kill_stress_thread()
220220

221+
@optional_stage('perf_preload_data')
221222
def preload_data(self, compaction_strategy=None):
222223
# if test require a pre-population of data
223224
prepare_write_cmd = self.params.get('prepare_write_cmd')
@@ -818,6 +819,7 @@ def _stop_stress_when_finished(self): # pylint: disable=no-self-use
818819
extra_time_to_expiration=60):
819820
self.loaders.kill_stress_thread()
820821

822+
@optional_stage('perf_steady_state_calc')
821823
@latency_calculator_decorator
822824
def steady_state_latency(self): # pylint: disable=no-self-use
823825
sleep_time = self.db_cluster.params.get('nemesis_interval') * 60

0 commit comments

Comments
 (0)