diff options
author | Олег <150132506+iddqdex@users.noreply.github.com> | 2024-09-03 13:11:33 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-03 13:11:33 +0300 |
commit | 25aad65914a8dd2577c5416f2f8320fdf63aa0ed (patch) | |
tree | 7bbce8167bbda69128284203e5ed9589f47d989c | |
parent | 60953185ece46dde08bc9d06c353a6e7238506e5 (diff) | |
download | ydb-25aad65914a8dd2577c5416f2f8320fdf63aa0ed.tar.gz |
fix params looking (#8660)
-rw-r--r-- | ydb/tests/olap/load/conftest.py | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/ydb/tests/olap/load/conftest.py b/ydb/tests/olap/load/conftest.py index db68eeb7a6..f08ec2f753 100644 --- a/ydb/tests/olap/load/conftest.py +++ b/ydb/tests/olap/load/conftest.py @@ -5,6 +5,8 @@ from ydb.tests.olap.lib.ydb_cli import YdbCliHelper, WorkloadType from ydb.tests.olap.lib.allure_utils import allure_test_description from ydb.tests.olap.lib.results_processor import ResultsProcessor from time import time +from allure_commons._core import plugin_manager +from allure_pytest.listener import AllureListener class LoadSuiteBase: @@ -29,6 +31,12 @@ class LoadSuiteBase: test = f'Query{query_num:02d}' allure_test_description(self.suite, test, refference_set=self.refference) + allure_listener = next(filter(lambda x: isinstance(x, AllureListener), plugin_manager.get_plugin_manager().get_plugins())) + allure_test_result = allure_listener.allure_logger.get_test(None) + query_num_param = next(filter(lambda x: x.name == 'query_num', allure_test_result.parameters), None) + if query_num_param: + query_num_param.mode = allure.parameter_mode.HIDDEN.value + result = YdbCliHelper.workload_run( path=path, query_num=query_num, iterations=self.iterations, type=self.workload_type, timeout=self.timeout ) @@ -63,9 +71,11 @@ class LoadSuiteBase: if result.stderr is not None: allure.attach(result.stderr, 'Stderr', attachment_type=allure.attachment_type.TEXT) - for p in ['Min', 'Max', 'Mean', 'Median']: + for p in ['Mean']: if p in stats: - allure.dynamic.parameter(p, f'{int(stats[p])} ms') + value = int(stats[p]) + s = f'{int(value / 1000)}s ' if value >= 1000 else '' + allure.dynamic.parameter(p, f'{s}{value % 1000}ms') error_message = '' success = True if not result.success: |