diff --git a/ydb/library/workload/abstract/workload_query_generator.h b/ydb/library/workload/abstract/workload_query_generator.h index 7181cf30c15c..4ddc6c8d3dfc 100644 --- a/ydb/library/workload/abstract/workload_query_generator.h +++ b/ydb/library/workload/abstract/workload_query_generator.h @@ -35,6 +35,7 @@ struct TQueryInfo { TString TablePath; std::optional KeyToRead; std::optional AlterTable; + std::function TableOperation; std::optional> ReadRowsResultCallback; std::optional> DataQueryResultCallback; diff --git a/ydb/library/workload/log/log.cpp b/ydb/library/workload/log/log.cpp new file mode 100644 index 000000000000..2852a85afaa1 --- /dev/null +++ b/ydb/library/workload/log/log.cpp @@ -0,0 +1,322 @@ +#include "log.h" +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NYdbWorkload { + +namespace NLog { + +using TRow = TLogGenerator::TRow; + + +TLogGenerator::TLogGenerator(const TLogWorkloadParams* params) + : TBase(params) + , TotalColumnsCnt(1 + Params.IntColumnsCnt + Params.StrColumnsCnt) + , RandomDevice() + , Mt19937(RandomDevice()) +{ + Y_ABORT_UNLESS(TotalColumnsCnt >= Params.KeyColumnsCnt); +} + +std::string TLogGenerator::GetDDLQueries() const { + std::stringstream ss; + + ss << "--!syntax_v1\n"; + ss << "CREATE TABLE `" << Params.DbPath << "/" << Params.TableName << "`("; + + for (size_t i = 0; i < TotalColumnsCnt; ++i) { + if (i == 0) { + ss << "ts Timestamp"; + } else if (i < Params.IntColumnsCnt + 1) { + ss << "c" << i << " Uint64"; + } else { + ss << "c" << i << " String"; + } + + if (i < Params.KeyColumnsCnt && Params.GetStoreType() == TLogWorkloadParams::EStoreType::Column) { + ss << " NOT NULL"; + } + ss << ", "; + } + + ss << "PRIMARY KEY("; + ss << "ts, "; + for (size_t i = 1; i < Params.KeyColumnsCnt; ++i) { + ss << "c" << i; + if (i + 1 < Params.KeyColumnsCnt) { + ss << ", "; + } + } + ss << ")) WITH ("; + + ss << "TTL = Interval(\"PT" << Params.TimestampTtlMinutes << "M\") ON ts, "; + + switch (Params.GetStoreType()) { + case TLogWorkloadParams::EStoreType::Row: + ss << "STORE = ROW, "; + break; + case TLogWorkloadParams::EStoreType::Column: + ss << "STORE = COLUMN, "; + break; + default: + throw yexception() << "Unsupported store type: " << Params.GetStoreType(); + } + if (Params.PartitionsByLoad) { + ss << "AUTO_PARTITIONING_BY_LOAD = ENABLED, "; + } + ss << "AUTO_PARTITIONING_MAX_PARTITIONS_COUNT = " << Max(Params.MinPartitions, Params.MaxPartitions) << ", "; + ss << "AUTO_PARTITIONING_PARTITION_SIZE_MB = " << Params.PartitionSizeMb << ", "; + ss << "AUTO_PARTITIONING_MIN_PARTITIONS_COUNT = " << Params.MinPartitions << ")"; + return ss.str(); +} + +TQueryInfoList TLogGenerator::GetWorkload(int type) { + switch (static_cast(type)) { + case EType::Insert: + return Insert(GenerateRandomRows()); + case EType::Upsert: + return Upsert(GenerateRandomRows()); + case EType::BulkUpsert: + return BulkUpsert(GenerateRandomRows()); + default: + return TQueryInfoList(); + } +} + + +TVector TLogGenerator::GetSupportedWorkloadTypes() const { + TVector result; + result.emplace_back(static_cast(EType::Insert), "insert", "Insert random rows into table near current ts"); + result.emplace_back(static_cast(EType::Upsert), "upsert", "Upsert random rows into table near current ts"); + result.emplace_back(static_cast(EType::BulkUpsert), "bulk_upsert", "Bulk upsert random rows into table near current ts"); + return result; +} + +TQueryInfoList TLogGenerator::WriteRows(TString operation, TVector&& rows) { + std::stringstream ss; + + NYdb::TParamsBuilder paramsBuilder; + + ss << "--!syntax_v1\n"; + + for (size_t row = 0; row < Params.RowsCnt; ++row) { + for (size_t col = 0; col < TotalColumnsCnt; ++col) { + TString cname = "$c" + std::to_string(row) + "_" + std::to_string(col); + if (col == 0) { + ss << "DECLARE " << cname << " AS Timestamp;\n"; + paramsBuilder.AddParam(cname).Timestamp(rows[row].Ts).Build(); + } else if (col < Params.IntColumnsCnt + 1) { + ss << "DECLARE " << cname << " AS Uint64;\n"; + paramsBuilder.AddParam(cname).Uint64(rows[row].Ints[col - 1]).Build(); + } else { + ss << "DECLARE " << cname << " AS String;\n"; + paramsBuilder.AddParam(cname).String(rows[row].Strings[col - Params.IntColumnsCnt - 1]).Build(); + } + } + } + + ss << operation << " INTO `" << Params.TableName << "` ("; + + for (size_t col = 0; col < TotalColumnsCnt; ++col) { + if (col != 0) { + ss << "c" << col; + } else { + ss << "ts"; + } + + if (col + 1 < TotalColumnsCnt) { + ss << ", "; + } + } + + ss << ") VALUES "; + + for (size_t row = 0; row < Params.RowsCnt; ++row) { + ss << "("; + + for (size_t col = 0; col < TotalColumnsCnt; ++col) { + ss << "$c" << row << "_" << col; + if (col + 1 < TotalColumnsCnt) { + ss << ", "; + } + } + + ss << ")"; + + if (row + 1 < Params.RowsCnt) { + ss << ", "; + } + } + auto params = paramsBuilder.Build(); + return TQueryInfoList(1, TQueryInfo(ss.str(), std::move(params))); +} + +TQueryInfoList TLogGenerator::Insert(TVector&& rows) { + return WriteRows("INSERT", std::move(rows)); +} + +TQueryInfoList TLogGenerator::Upsert(TVector&& rows) { + return WriteRows("UPSERT", std::move(rows)); +} + +TQueryInfoList TLogGenerator::BulkUpsert(TVector&& rows) { + NYdb::TValueBuilder valueBuilder; + valueBuilder.BeginList(); + for (const TRow& row : rows) { + auto &listItem = valueBuilder.AddListItem(); + listItem.BeginStruct(); + for (size_t col = 0; col < TotalColumnsCnt; ++col) { + if (col == 0) { + listItem.AddMember("ts").Timestamp(row.Ts); + } else if (col < Params.IntColumnsCnt + 1) { + listItem.AddMember(std::format("c{}", col)).Uint64(row.Ints[col-1]); + } else { + listItem.AddMember(std::format("c{}", col)).String(row.Strings[col - Params.IntColumnsCnt - 1]); + } + } + listItem.EndStruct(); + } + valueBuilder.EndList(); + TString table_path = Params.DbPath + "/" + Params.TableName; + NYdb::TValue rowsValue = valueBuilder.Build(); + auto bulkUpsertOperation = [table_path, rowsValue](NYdb::NTable::TTableClient& tableClient) { + auto r = rowsValue; + auto status = tableClient.BulkUpsert(table_path, std::move(r)); + return status.GetValueSync(); + }; + TQueryInfo queryInfo; + queryInfo.TableOperation = bulkUpsertOperation; + return TQueryInfoList(1, std::move(queryInfo)); +} + + +TQueryInfoList TLogGenerator::GetInitialData() { + TQueryInfoList res; + return res; +} + +TVector TLogGenerator::GetCleanPaths() const { + return { Params.TableName }; +} + +TVector TLogGenerator::GenerateRandomRows() { + TVector result(Params.RowsCnt); + + std::normal_distribution normal_distribution_generator(0, static_cast(Params.TimestampStandardDeviationMinutes)); + for (size_t row = 0; row < Params.RowsCnt; ++row) { + result[row].Ts = TInstant::Now(); + i64 millisecondsDiff = 60*1000*normal_distribution_generator(Mt19937); + if (millisecondsDiff >= 0) { // TDuration::MilliSeconds can't be negative for some reason... + result[row].Ts = result[row].Ts + TDuration::MilliSeconds(millisecondsDiff); + } else { + result[row].Ts = result[row].Ts - TDuration::MilliSeconds(-millisecondsDiff); + } + + result[row].Ints.resize(Params.IntColumnsCnt); + result[row].Strings.resize(Params.StrColumnsCnt); + + for (size_t col = 0; col < Params.IntColumnsCnt; ++col) { + ui64 val = RandomNumber(); + result[row].Ints[col] = val; + } + + for (size_t col = 0; col < Params.StrColumnsCnt; ++col) { + TString val; + val = TString(Params.StringLen, '_'); + for (size_t i = 0; i < Params.StringLen; i++) { + val[i] = (char)('a' + RandomNumber(26)); + } + result[row].Strings[col] = val; + } + } + + return result; +} + +void TLogWorkloadParams::ConfigureOpts(NLastGetopt::TOpts& opts, const ECommandType commandType, int workloadType) { + opts.AddLongOption('p', "path", "Path where benchmark tables are located") + .Optional() + .DefaultValue(TableName) + .Handler1T([this](TStringBuf arg) { + while(arg.SkipPrefix("/")); + while(arg.ChopSuffix("/")); + TableName = arg; + }); + switch (commandType) { + case TWorkloadParams::ECommandType::Init: + opts.AddLongOption("min-partitions", "Minimum partitions for tables.") + .DefaultValue((ui64)LogWorkloadConstants::MIN_PARTITIONS).StoreResult(&MinPartitions); + opts.AddLongOption("max-partitions", "Maximum partitions for tables.") + .DefaultValue((ui64)LogWorkloadConstants::MAX_PARTITIONS).StoreResult(&MaxPartitions); + opts.AddLongOption("partition-size", "Maximum partition size in megabytes (AUTO_PARTITIONING_PARTITION_SIZE_MB).") + .DefaultValue((ui64)LogWorkloadConstants::PARTITION_SIZE_MB).StoreResult(&PartitionSizeMb); + opts.AddLongOption("auto-partition", "Enable auto partitioning by load.") + .DefaultValue((ui64)LogWorkloadConstants::PARTITIONS_BY_LOAD).StoreResult(&PartitionsByLoad); + opts.AddLongOption("len", "String len") + .DefaultValue((ui64)LogWorkloadConstants::STRING_LEN).StoreResult(&StringLen); + opts.AddLongOption("int-cols", "Number of int columns") + .DefaultValue((ui64)LogWorkloadConstants::INT_COLUMNS_CNT).StoreResult(&IntColumnsCnt); + opts.AddLongOption("str-cols", "Number of string columns") + .DefaultValue((ui64)LogWorkloadConstants::STR_COLUMNS_CNT).StoreResult(&StrColumnsCnt); + opts.AddLongOption("key-cols", "Number of key columns") + .DefaultValue((ui64)LogWorkloadConstants::KEY_COLUMNS_CNT).StoreResult(&KeyColumnsCnt); + opts.AddLongOption("ttl", "TTL for timestamp column in minutes") + .DefaultValue((ui64)LogWorkloadConstants::TIMESTAMP_TTL_MIN).StoreResult(&TimestampTtlMinutes); + opts.AddLongOption("store", "Storage type." + " Options: row, column\n" + " row - use row-based storage engine;\n" + " column - use column-based storage engine.") + .DefaultValue(StoreType) + .Handler1T([this](TStringBuf arg) { + const auto l = to_lower(TString(arg)); + if (!TryFromString(arg, StoreType)) { + throw yexception() << "Ivalid store type: " << arg; + } + }); + break; + case TWorkloadParams::ECommandType::Run: + opts.AddLongOption("int-cols", "Number of int columns") + .DefaultValue((ui64)LogWorkloadConstants::INT_COLUMNS_CNT).StoreResult(&IntColumnsCnt); + opts.AddLongOption("str-cols", "Number of string columns") + .DefaultValue((ui64)LogWorkloadConstants::STR_COLUMNS_CNT).StoreResult(&StrColumnsCnt); + opts.AddLongOption("key-cols", "Number of key columns") + .DefaultValue((ui64)LogWorkloadConstants::KEY_COLUMNS_CNT).StoreResult(&KeyColumnsCnt); + switch (static_cast(workloadType)) { + case TLogGenerator::EType::Insert: + case TLogGenerator::EType::Upsert: + case TLogGenerator::EType::BulkUpsert: + opts.AddLongOption("len", "String len") + .DefaultValue((ui64)LogWorkloadConstants::STRING_LEN).StoreResult(&StringLen); + opts.AddLongOption("rows", "Number of rows to upsert") + .DefaultValue((ui64)LogWorkloadConstants::ROWS_CNT).StoreResult(&RowsCnt); + opts.AddLongOption("timestamp_deviation", "Standard deviation. For each timestamp, a random variable with a specified standard deviation in minutes is added.") + .DefaultValue((ui64)LogWorkloadConstants::TIMESTAMP_STANDARD_DEVIATION_MINUTES).StoreResult(&TimestampStandardDeviationMinutes); + break; + } + break; + default: + break; + } +} + +THolder TLogWorkloadParams::CreateGenerator() const { + return MakeHolder(this); +} + +TString TLogWorkloadParams::GetWorkloadName() const { + return "Log"; +} + +} // namespace NLog + +} // namespace NYdbWorkload diff --git a/ydb/library/workload/log/log.h b/ydb/library/workload/log/log.h new file mode 100644 index 000000000000..04851a2cc797 --- /dev/null +++ b/ydb/library/workload/log/log.h @@ -0,0 +1,112 @@ +#pragma once + +#include + +#include +#include +#include + +namespace NYdbWorkload { + +namespace NLog { + +enum LogWorkloadConstants : ui64 { + MIN_PARTITIONS = 40, + MAX_PARTITIONS = 1000, + PARTITION_SIZE_MB = 2000, + STRING_LEN = 8, + STR_COLUMNS_CNT = 1, + INT_COLUMNS_CNT = 1, + KEY_COLUMNS_CNT = 1, + ROWS_CNT = 1, + PARTITIONS_BY_LOAD = true, + + TIMESTAMP_STANDARD_DEVIATION_MINUTES = 0, + TIMESTAMP_TTL_MIN = 60, +}; + +class TLogWorkloadParams : public TWorkloadParams { +public: + enum class EStoreType { + Row /* "row" */, + Column /* "column" */, + }; + + void ConfigureOpts(NLastGetopt::TOpts& opts, const ECommandType commandType, int workloadType) override; + THolder CreateGenerator() const override; + TString GetWorkloadName() const override; + ui64 MinPartitions = LogWorkloadConstants::MIN_PARTITIONS; + ui64 MaxPartitions = LogWorkloadConstants::MAX_PARTITIONS; + ui64 PartitionSizeMb = LogWorkloadConstants::PARTITION_SIZE_MB; + ui64 StringLen = LogWorkloadConstants::STRING_LEN; + ui64 StrColumnsCnt = LogWorkloadConstants::STR_COLUMNS_CNT; + ui64 IntColumnsCnt = LogWorkloadConstants::INT_COLUMNS_CNT; + ui64 KeyColumnsCnt = LogWorkloadConstants::KEY_COLUMNS_CNT; + ui64 TimestampStandardDeviationMinutes = LogWorkloadConstants::TIMESTAMP_STANDARD_DEVIATION_MINUTES; + ui64 TimestampTtlMinutes = LogWorkloadConstants::TIMESTAMP_STANDARD_DEVIATION_MINUTES; + ui64 RowsCnt = LogWorkloadConstants::ROWS_CNT; + bool PartitionsByLoad = LogWorkloadConstants::PARTITIONS_BY_LOAD; + + std::string TableName = "log_writer_test"; + + YDB_READONLY(EStoreType, StoreType, EStoreType::Row); +}; + +class TLogGenerator final: public TWorkloadQueryGeneratorBase { +public: + using TBase = TWorkloadQueryGeneratorBase; + struct TRow { + TInstant Ts; + TVector Ints; + TVector Strings; + + TString ToString() const { + std::stringstream ss; + ss << "( "; + for (auto i : Ints) { + ss << i << " "; + } + for (auto s : Strings) { + ss << s << " "; + } + ss << ")"; + return ss.str(); + } + + bool operator == (const TRow &other) const { + return Ts == other.Ts && Ints == other.Ints && Strings == other.Strings; + } + }; + TLogGenerator(const TLogWorkloadParams* params); + + std::string GetDDLQueries() const override; + + TQueryInfoList GetInitialData() override; + + TVector GetCleanPaths() const override; + + TQueryInfoList GetWorkload(int type) override; + TVector GetSupportedWorkloadTypes() const override; + + enum class EType { + Insert, + Upsert, + BulkUpsert, + }; + +private: + TQueryInfoList WriteRows(TString operation, TVector&& rows); + TQueryInfoList Insert(TVector&& rows); + TQueryInfoList Upsert(TVector&& rows); + TQueryInfoList BulkUpsert(TVector&& rows); + TVector GenerateRandomRows(); + + const ui64 TotalColumnsCnt; + + std::random_device RandomDevice; + std::mt19937 Mt19937; +}; + +} // namespace NLog + +} // namespace NYdbWorkload diff --git a/ydb/library/workload/log/registrar.cpp b/ydb/library/workload/log/registrar.cpp new file mode 100644 index 000000000000..f05a4cd59bbf --- /dev/null +++ b/ydb/library/workload/log/registrar.cpp @@ -0,0 +1,12 @@ +#include "log.h" +#include + +namespace NYdbWorkload { + +namespace NLog { + +TWorkloadFactory::TRegistrator Registrar("log"); + +} // namespace NLog + +} // namespace NYdbWorkload diff --git a/ydb/library/workload/log/ya.make b/ydb/library/workload/log/ya.make new file mode 100644 index 000000000000..fa1dadfca1d1 --- /dev/null +++ b/ydb/library/workload/log/ya.make @@ -0,0 +1,14 @@ +LIBRARY() + +SRCS( + GLOBAL registrar.cpp + log.cpp +) + +PEERDIR( + ydb/library/workload/abstract +) + +GENERATE_ENUM_SERIALIZATION_WITH_HEADER(log.h) + +END() diff --git a/ydb/library/workload/ya.make b/ydb/library/workload/ya.make index 8ebc3191616a..7819c15847a4 100644 --- a/ydb/library/workload/ya.make +++ b/ydb/library/workload/ya.make @@ -4,6 +4,7 @@ PEERDIR( ydb/library/workload/abstract ydb/library/workload/clickbench ydb/library/workload/kv + ydb/library/workload/log ydb/library/workload/stock ydb/library/workload/tpcds ydb/library/workload/tpch @@ -16,6 +17,7 @@ RECURSE( benchmark_base clickbench kv + log stock tpc_base tpcds diff --git a/ydb/public/lib/ydb_cli/commands/ydb_workload.cpp b/ydb/public/lib/ydb_cli/commands/ydb_workload.cpp index 7b711ff5440b..8cc76d67ac15 100644 --- a/ydb/public/lib/ydb_cli/commands/ydb_workload.cpp +++ b/ydb/public/lib/ydb_cli/commands/ydb_workload.cpp @@ -123,12 +123,13 @@ void TWorkloadCommand::PrepareForRun(TConfig& config) { driverConfig.UseSecureConnection(config.CaCerts); } Driver = std::make_unique(NYdb::TDriver(driverConfig)); + auto tableClientSettings = NTable::TClientSettings() + .SessionPoolSettings( + NTable::TSessionPoolSettings() + .MaxActiveSessions(10+Threads)); + TableClient = std::make_unique(*Driver, tableClientSettings); if (QueryExecuterType == "data") { - auto tableClientSettings = NTable::TClientSettings() - .SessionPoolSettings( - NTable::TSessionPoolSettings() - .MaxActiveSessions(10+Threads)); - TableClient = std::make_unique(*Driver, tableClientSettings); + // nothing to do } else if (QueryExecuterType == "generic") { auto queryClientSettings = NQuery::TClientSettings() .SessionPoolSettings( @@ -153,7 +154,7 @@ void TWorkloadCommand::WorkerFn(int taskId, NYdbWorkload::IWorkloadQueryGenerato auto runTableClient = [this, &queryInfo, &dataQuerySettings, &retryCount] (NYdb::NTable::TSession session) -> NYdb::TStatus { if (!TableClient) { - Y_FAIL_S("Only data query executer type supported."); + Y_FAIL_S("TableClient is not initialized."); } ++retryCount; if (queryInfo.AlterTable) { @@ -168,6 +169,9 @@ void TWorkloadCommand::WorkerFn(int taskId, NYdbWorkload::IWorkloadQueryGenerato queryInfo.ReadRowsResultCallback.value()(result); } return result; + } else if (queryInfo.TableOperation) { + auto result = queryInfo.TableOperation(*TableClient); + return result; } else { auto mode = queryInfo.UseStaleRO ? NYdb::NTable::TTxSettings::StaleRO() : NYdb::NTable::TTxSettings::SerializableRW(); auto result = session.ExecuteDataQuery(queryInfo.Query.c_str(), @@ -183,7 +187,7 @@ void TWorkloadCommand::WorkerFn(int taskId, NYdbWorkload::IWorkloadQueryGenerato auto runQueryClient = [this, &queryInfo, &genericQuerySettings, &retryCount] (NYdb::NQuery::TSession session) -> NYdb::NQuery::TAsyncExecuteQueryResult { if (!QueryClient) { - Y_FAIL_S("Only generic query executer type supported."); + Y_FAIL_S("QueryClient is not initialized."); } ++retryCount; if (queryInfo.AlterTable) { @@ -200,8 +204,7 @@ void TWorkloadCommand::WorkerFn(int taskId, NYdbWorkload::IWorkloadQueryGenerato }; auto runQuery = [this, &runQueryClient, &runTableClient, &queryInfo]() -> NYdb::TStatus { - Y_ENSURE_BT(TableClient || QueryClient); - if (TableClient) { + if (QueryExecuterType == "data") { return TableClient->RetryOperationSync(runTableClient); } else { auto result = QueryClient->RetryQuery(runQueryClient).GetValueSync(); @@ -233,7 +236,7 @@ void TWorkloadCommand::WorkerFn(int taskId, NYdbWorkload::IWorkloadQueryGenerato } queryInfo = *it; - auto status = runQuery(); + auto status = queryInfo.TableOperation ? TableClient->RetryOperationSync(runTableClient) : runQuery(); if (status.IsSuccess()) { TotalQueries++; } else { diff --git a/ydb/tests/workloads/log/tests/test_workload.py b/ydb/tests/workloads/log/tests/test_workload.py new file mode 100644 index 000000000000..098cdfc70ae1 --- /dev/null +++ b/ydb/tests/workloads/log/tests/test_workload.py @@ -0,0 +1,60 @@ +# -*- coding: utf-8 -*- +import os + +import pytest + +import yatest + +from ydb.tests.library.harness.kikimr_runner import KiKiMR +from ydb.tests.library.harness.kikimr_config import KikimrConfigGenerator +from ydb.tests.library.common.types import Erasure + + +class TestYdbLogWorkload(object): + @classmethod + def setup_class(cls): + cls.cluster = KiKiMR(KikimrConfigGenerator(erasure=Erasure.MIRROR_3_DC)) + cls.cluster.start() + cls.init_command_prefix = [ + yatest.common.binary_path(os.getenv("YDB_CLI_BINARY")), + "--verbose", + "--endpoint", "grpc://localhost:%d" % cls.cluster.nodes[1].grpc_port, + "--database=/Root", + "workload", "log", "init", + "--min-partitions", "100", + "--partition-size", "10", + "--auto-partition", "0", + "--int-cols", "10", + "--key-cols", "10", + ] + + cls.run_command_prefix = [ + yatest.common.binary_path(os.getenv("YDB_CLI_BINARY")), + "--verbose", + "--endpoint", "grpc://localhost:%d" % cls.cluster.nodes[1].grpc_port, + "--database=/Root", + "workload", "log", "run", "bulk_upsert", + "--seconds", "10", + "--threads", "10", + "--len", "200", + "--int-cols", "10", + "--key-cols", "10", + ] + + @classmethod + def teardown_class(cls): + cls.cluster.stop() + + @pytest.mark.parametrize("store_type", ["row", "column"]) + def test(self, store_type): + init_command = self.init_command_prefix + init_command.extend([ + "--path", store_type, + "--store", store_type, + ]) + run_command = self.run_command_prefix + run_command.extend([ + "--path", store_type, + ]) + yatest.common.execute(init_command, wait=True) + yatest.common.execute(run_command, wait=True) diff --git a/ydb/tests/workloads/log/tests/ya.make b/ydb/tests/workloads/log/tests/ya.make new file mode 100644 index 000000000000..7dd67a33aae0 --- /dev/null +++ b/ydb/tests/workloads/log/tests/ya.make @@ -0,0 +1,29 @@ +PY3TEST() +ENV(YDB_DRIVER_BINARY="ydb/apps/ydbd/ydbd") +ENV(YDB_CLI_BINARY="ydb/apps/ydb/ydb") +ENV(YDB_ERASURE=mirror_3_dc) +ENV(YDB_USE_IN_MEMORY_PDISKS=true) + +TEST_SRCS( + test_workload.py +) + +IF (SANITIZER_TYPE) + SIZE(MEDIUM) + REQUIREMENTS(ram:32) +ELSE() + SIZE(MEDIUM) +ENDIF() + + +DEPENDS( + ydb/apps/ydbd + ydb/apps/ydb +) + +PEERDIR( + ydb/tests/library +) + + +END() diff --git a/ydb/tests/workloads/log/ya.make b/ydb/tests/workloads/log/ya.make new file mode 100644 index 000000000000..d850faba6b2e --- /dev/null +++ b/ydb/tests/workloads/log/ya.make @@ -0,0 +1,4 @@ +RECURSE_FOR_TESTS( + tests +) + diff --git a/ydb/tests/workloads/ya.make b/ydb/tests/workloads/ya.make index 9966ad9e4c10..d4628eab406f 100644 --- a/ydb/tests/workloads/ya.make +++ b/ydb/tests/workloads/ya.make @@ -1,5 +1,6 @@ RECURSE( kv + log olap_workload simple_queue statistics_workload