Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions ydb/tests/olap/load/lib/upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
import allure
import logging
import ydb.tests.olap.lib.remote_execution as re
import pytest
from .tpch import TpchSuiteBase


class UploadSuiteBase(LoadSuiteBase):
Expand Down Expand Up @@ -144,10 +146,15 @@ def save_result_additional_info(self, result: YdbCliHelper.WorkloadRunResult):
raw_tables_size_bytes, tables_size_bytes = self.__get_tables_size_bytes()
result.add_stat(self.query_name, 'tables_size_bytes', tables_size_bytes)
result.add_stat(self.query_name, 'raw_tables_size_bytes', raw_tables_size_bytes)
sleep(120) # wait statistics


class UploadTpchBase(UploadClusterBase):
__static_nodes: list[YdbCluster.Node] = []
workload_type = TpchSuiteBase.workload_type
iterations = TpchSuiteBase.iterations
tables_size = TpchSuiteBase.tables_size
check_canonical = TpchSuiteBase.check_canonical

@classmethod
def __execute_on_nodes(cls, cmd):
Expand Down Expand Up @@ -204,6 +211,10 @@ def do_teardown_class(cls) -> None:
yatest.common.execute(YdbCliHelper.get_cli_command() + ['workload', 'tpch', '-p', YdbCluster.get_tables_path(cls.get_path()), 'clean'])
cls.__execute_on_nodes(f'rm -rf {cls.get_remote_tmpdir()}')

@pytest.mark.parametrize('query_num', [i for i in range(1, 23)])
def test_tpch(self, query_num: int):
self.run_workload_test(self.get_path(), query_num)


class TestUploadTpch1(UploadTpchBase):
scale: int = 1
Expand Down
Loading