aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorazevaykin <azevaykin@yandex-team.com>2023-04-10 10:03:34 +0300
committerazevaykin <azevaykin@yandex-team.com>2023-04-10 10:03:34 +0300
commitb95ce4fc6958160fe08580bc73a4b03f2d0b25d3 (patch)
tree8729b65c4f8b55baed4f3c36b5f2c9a23952abe0
parent0898d2c2865676cf1622e78dd5a84f9e0b9daaf1 (diff)
downloadydb-b95ce4fc6958160fe08580bc73a4b03f2d0b25d3.tar.gz
k,m,g suffixes for MessageSize & ByteRate
Read mane sessions by GetEvents
-rw-r--r--ydb/public/lib/ydb_cli/commands/topic_workload/CMakeLists.darwin-x86_64.txt1
-rw-r--r--ydb/public/lib/ydb_cli/commands/topic_workload/CMakeLists.linux-aarch64.txt1
-rw-r--r--ydb/public/lib/ydb_cli/commands/topic_workload/CMakeLists.linux-x86_64.txt1
-rw-r--r--ydb/public/lib/ydb_cli/commands/topic_workload/CMakeLists.windows-x86_64.txt1
-rw-r--r--ydb/public/lib/ydb_cli/commands/topic_workload/topic_workload_params.cpp33
-rw-r--r--ydb/public/lib/ydb_cli/commands/topic_workload/topic_workload_params.h1
-rw-r--r--ydb/public/lib/ydb_cli/commands/topic_workload/topic_workload_params_ut.cpp43
-rw-r--r--ydb/public/lib/ydb_cli/commands/topic_workload/topic_workload_reader.cpp82
-rw-r--r--ydb/public/lib/ydb_cli/commands/topic_workload/topic_workload_run_full.cpp4
-rw-r--r--ydb/public/lib/ydb_cli/commands/topic_workload/topic_workload_run_write.cpp4
-rw-r--r--ydb/public/lib/ydb_cli/commands/topic_workload/ut/CMakeLists.darwin-x86_64.txt67
-rw-r--r--ydb/public/lib/ydb_cli/commands/topic_workload/ut/CMakeLists.linux-aarch64.txt70
-rw-r--r--ydb/public/lib/ydb_cli/commands/topic_workload/ut/CMakeLists.linux-x86_64.txt72
-rw-r--r--ydb/public/lib/ydb_cli/commands/topic_workload/ut/CMakeLists.txt17
-rw-r--r--ydb/public/lib/ydb_cli/commands/topic_workload/ut/CMakeLists.windows-x86_64.txt60
15 files changed, 412 insertions, 45 deletions
diff --git a/ydb/public/lib/ydb_cli/commands/topic_workload/CMakeLists.darwin-x86_64.txt b/ydb/public/lib/ydb_cli/commands/topic_workload/CMakeLists.darwin-x86_64.txt
index ce4312b20f5..a8ce8af0af4 100644
--- a/ydb/public/lib/ydb_cli/commands/topic_workload/CMakeLists.darwin-x86_64.txt
+++ b/ydb/public/lib/ydb_cli/commands/topic_workload/CMakeLists.darwin-x86_64.txt
@@ -6,6 +6,7 @@
# original buildsystem will not be accepted.
+add_subdirectory(ut)
add_library(topic_workload)
target_link_libraries(topic_workload PUBLIC
diff --git a/ydb/public/lib/ydb_cli/commands/topic_workload/CMakeLists.linux-aarch64.txt b/ydb/public/lib/ydb_cli/commands/topic_workload/CMakeLists.linux-aarch64.txt
index 1499a10225a..729f923f332 100644
--- a/ydb/public/lib/ydb_cli/commands/topic_workload/CMakeLists.linux-aarch64.txt
+++ b/ydb/public/lib/ydb_cli/commands/topic_workload/CMakeLists.linux-aarch64.txt
@@ -6,6 +6,7 @@
# original buildsystem will not be accepted.
+add_subdirectory(ut)
add_library(topic_workload)
target_link_libraries(topic_workload PUBLIC
diff --git a/ydb/public/lib/ydb_cli/commands/topic_workload/CMakeLists.linux-x86_64.txt b/ydb/public/lib/ydb_cli/commands/topic_workload/CMakeLists.linux-x86_64.txt
index 1499a10225a..729f923f332 100644
--- a/ydb/public/lib/ydb_cli/commands/topic_workload/CMakeLists.linux-x86_64.txt
+++ b/ydb/public/lib/ydb_cli/commands/topic_workload/CMakeLists.linux-x86_64.txt
@@ -6,6 +6,7 @@
# original buildsystem will not be accepted.
+add_subdirectory(ut)
add_library(topic_workload)
target_link_libraries(topic_workload PUBLIC
diff --git a/ydb/public/lib/ydb_cli/commands/topic_workload/CMakeLists.windows-x86_64.txt b/ydb/public/lib/ydb_cli/commands/topic_workload/CMakeLists.windows-x86_64.txt
index ce4312b20f5..a8ce8af0af4 100644
--- a/ydb/public/lib/ydb_cli/commands/topic_workload/CMakeLists.windows-x86_64.txt
+++ b/ydb/public/lib/ydb_cli/commands/topic_workload/CMakeLists.windows-x86_64.txt
@@ -6,6 +6,7 @@
# original buildsystem will not be accepted.
+add_subdirectory(ut)
add_library(topic_workload)
target_link_libraries(topic_workload PUBLIC
diff --git a/ydb/public/lib/ydb_cli/commands/topic_workload/topic_workload_params.cpp b/ydb/public/lib/ydb_cli/commands/topic_workload/topic_workload_params.cpp
index b02a1cd883c..bbafa72588f 100644
--- a/ydb/public/lib/ydb_cli/commands/topic_workload/topic_workload_params.cpp
+++ b/ydb/public/lib/ydb_cli/commands/topic_workload/topic_workload_params.cpp
@@ -2,6 +2,8 @@
#include "topic_workload_defines.h"
+#include <library/cpp/getopt/small/last_getopt_support.h>
+#include <library/cpp/regex/pcre/regexp.h>
#include <ydb/public/sdk/cpp/client/ydb_topic/topic.h>
using namespace NYdb::NConsoleClient;
@@ -17,6 +19,37 @@ ui32 TCommandWorkloadTopicParams::StrToCodec(const TString& str) {
return (ui32)codecs[loweredStr];
}
+ui64 TCommandWorkloadTopicParams::StrToBytes(const TString& str)
+{
+ TString loweredStr(str);
+ loweredStr.to_lower();
+ auto len = loweredStr.size();
+ if (len == 0)
+ ythrow NLastGetopt::TUsageException() << "Empty string can't be parsed as a valid number";
+
+ TRegExMatch regex("\\d+[kmg]?");
+ if (!regex.Match(loweredStr.c_str()))
+ ythrow NLastGetopt::TUsageException() << "'" << str << "' can't be parsed as a valid number";
+
+ THashMap<char, ui64> suffixes{
+ {'k', 1024},
+ {'m', 1024 * 1024},
+ {'g', 1024 * 1024 * 1024}};
+
+ char lastChar = loweredStr[len - 1];
+
+ auto suffix = suffixes.find(lastChar);
+ if (suffix)
+ {
+ ui64 ret = std::stoul(loweredStr.substr(0, len - 1));
+ ret *= suffix->second;
+ return ret;
+ } else {
+ ui64 ret = std::stoul(loweredStr);
+ return ret;
+ }
+}
+
TString TCommandWorkloadTopicParams::GenerateConsumerName(ui32 consumerIdx)
{
TString consumerName = TStringBuilder() << CONSUMER_PREFIX << '-' << consumerIdx;
diff --git a/ydb/public/lib/ydb_cli/commands/topic_workload/topic_workload_params.h b/ydb/public/lib/ydb_cli/commands/topic_workload/topic_workload_params.h
index ddf7e5a355e..2ad9eebc40d 100644
--- a/ydb/public/lib/ydb_cli/commands/topic_workload/topic_workload_params.h
+++ b/ydb/public/lib/ydb_cli/commands/topic_workload/topic_workload_params.h
@@ -8,6 +8,7 @@ namespace NYdb {
class TCommandWorkloadTopicParams {
public:
static ui32 StrToCodec(const TString& str);
+ static ui64 StrToBytes(const TString& str);
static TString GenerateConsumerName(ui32 consumerIdx);
};
diff --git a/ydb/public/lib/ydb_cli/commands/topic_workload/topic_workload_params_ut.cpp b/ydb/public/lib/ydb_cli/commands/topic_workload/topic_workload_params_ut.cpp
new file mode 100644
index 00000000000..7d29fb1e584
--- /dev/null
+++ b/ydb/public/lib/ydb_cli/commands/topic_workload/topic_workload_params_ut.cpp
@@ -0,0 +1,43 @@
+
+#include "topic_workload_params.h"
+
+#include <library/cpp/testing/unittest/registar.h>
+#include <library/cpp/getopt/small/last_getopt_support.h>
+
+namespace NYdb::NConsoleClient {
+ class TCommandWorkloadTopicParamsTests: public NUnitTest::TTestBase {
+ public:
+ UNIT_TEST_SUITE(TCommandWorkloadTopicParamsTests)
+ UNIT_TEST(TestRun_StrToBytes_Simple);
+ UNIT_TEST(TestRun_StrToBytes_Kilo);
+ UNIT_TEST(TestRun_StrToBytes_Mega);
+ UNIT_TEST(TestRun_StrToBytes_Giga);
+ UNIT_TEST(TestRun_StrToBytes_Error);
+ UNIT_TEST_SUITE_END();
+
+ void TestRun_StrToBytes_Simple() {
+ UNIT_ASSERT_EQUAL(TCommandWorkloadTopicParams::StrToBytes("12345"), 12345);
+ }
+
+ void TestRun_StrToBytes_Kilo() {
+ UNIT_ASSERT_EQUAL(TCommandWorkloadTopicParams::StrToBytes("12345k"), 12345ull * 1024);
+ UNIT_ASSERT_EQUAL(TCommandWorkloadTopicParams::StrToBytes("12345K"), 12345ull * 1024);
+ }
+
+ void TestRun_StrToBytes_Mega() {
+ UNIT_ASSERT_EQUAL(TCommandWorkloadTopicParams::StrToBytes("12345m"), 12345ull * 1024 * 1024);
+ UNIT_ASSERT_EQUAL(TCommandWorkloadTopicParams::StrToBytes("12345M"), 12345ull * 1024 * 1024);
+ }
+
+ void TestRun_StrToBytes_Giga() {
+ UNIT_ASSERT_EQUAL(TCommandWorkloadTopicParams::StrToBytes("12345g"), 12345ull * 1024 * 1024 * 1024);
+ UNIT_ASSERT_EQUAL(TCommandWorkloadTopicParams::StrToBytes("12345G"), 12345ull * 1024 * 1024 * 1024);
+ }
+
+ void TestRun_StrToBytes_Error() {
+ UNIT_ASSERT_EXCEPTION(TCommandWorkloadTopicParams::StrToBytes("WrongNumber"), NLastGetopt::TException);
+ }
+ };
+
+ UNIT_TEST_SUITE_REGISTRATION(TCommandWorkloadTopicParamsTests);
+} // namespace NYdb::NConsoleClient
diff --git a/ydb/public/lib/ydb_cli/commands/topic_workload/topic_workload_reader.cpp b/ydb/public/lib/ydb_cli/commands/topic_workload/topic_workload_reader.cpp
index b47670691aa..5e0b9ee5855 100644
--- a/ydb/public/lib/ydb_cli/commands/topic_workload/topic_workload_reader.cpp
+++ b/ydb/public/lib/ydb_cli/commands/topic_workload/topic_workload_reader.cpp
@@ -15,7 +15,7 @@ void TTopicWorkloadReader::ReaderLoop(TTopicWorkloadReaderParams&& params) {
.AppendTopics(TOPIC);
auto readSession = topicClient->CreateReadSession(settings);
- WRITE_LOG(params.Log,ELogPriority::TLOG_INFO, "READER Session was created\n");
+ WRITE_LOG(params.Log, ELogPriority::TLOG_INFO, "READER Session was created\n");
struct TPartitionStreamState {
ui64 StartOffset;
@@ -41,47 +41,47 @@ void TTopicWorkloadReader::ReaderLoop(TTopicWorkloadReaderParams&& params) {
}
readSession->WaitEvent().Wait(TDuration::Seconds(1));
- TMaybe<NYdb::NTopic::TReadSessionEvent::TEvent> event = readSession->GetEvent(false);
- if (!event)
- continue;
-
- if (auto* dataEvent = std::get_if<NYdb::NTopic::TReadSessionEvent::TDataReceivedEvent>(&*event)) {
- WRITE_LOG(params.Log,ELogPriority::TLOG_DEBUG, TStringBuilder() << dataEvent->DebugString() << "\n");
- for (const auto& message : dataEvent->GetMessages()) {
- auto messageGroupId = message.GetMessageGroupId();
- auto stream = message.GetPartitionSession();
- auto topic = stream->GetTopicPath();
- auto partition = stream->GetPartitionId();
- ui64 fullTime = (TInstant::Now() - message.GetCreateTime()).MilliSeconds();
-
- WRITE_LOG(params.Log,ELogPriority::TLOG_DEBUG, TStringBuilder() << "READER Got message: " << messageGroupId << " topic " << topic << " partition " << partition << " offset " << message.GetOffset() << " seqNo " << message.GetSeqNo() << "\n");
-
- params.StatsCollector->AddReaderEvent(message.GetData().Size(), fullTime);
+ auto events = readSession->GetEvents(false);
+
+ for (auto& event : events) {
+ if (auto* dataEvent = std::get_if<NYdb::NTopic::TReadSessionEvent::TDataReceivedEvent>(&event)) {
+ WRITE_LOG(params.Log, ELogPriority::TLOG_DEBUG, TStringBuilder() << dataEvent->DebugString() << "\n");
+ for (const auto& message : dataEvent->GetMessages()) {
+ auto messageGroupId = message.GetMessageGroupId();
+ auto stream = message.GetPartitionSession();
+ auto topic = stream->GetTopicPath();
+ auto partition = stream->GetPartitionId();
+ ui64 fullTime = (TInstant::Now() - message.GetCreateTime()).MilliSeconds();
+
+ WRITE_LOG(params.Log, ELogPriority::TLOG_DEBUG, TStringBuilder() << "READER Got message: " << messageGroupId << " topic " << topic << " partition " << partition << " offset " << message.GetOffset() << " seqNo " << message.GetSeqNo() << "\n");
+
+ params.StatsCollector->AddReaderEvent(message.GetData().Size(), fullTime);
+ }
+ dataEvent->Commit();
+ } else if (auto* createPartitionStreamEvent = std::get_if<NYdb::NTopic::TReadSessionEvent::TStartPartitionSessionEvent>(&event)) {
+ auto stream = createPartitionStreamEvent->GetPartitionSession();
+ ui64 startOffset = streamState[std::make_pair(stream->GetTopicPath(), stream->GetPartitionId())].StartOffset;
+ streamState[std::make_pair(stream->GetTopicPath(), stream->GetPartitionId())].Stream = stream;
+ WRITE_LOG(params.Log, ELogPriority::TLOG_DEBUG, TStringBuilder() << "READER Starting read " << createPartitionStreamEvent->DebugString() << " from " << startOffset << "\n");
+ createPartitionStreamEvent->Confirm();
+ } else if (auto* destroyPartitionStreamEvent = std::get_if<NYdb::NTopic::TReadSessionEvent::TStopPartitionSessionEvent>(&event)) {
+ auto stream = destroyPartitionStreamEvent->GetPartitionSession();
+ streamState[std::make_pair(stream->GetTopicPath(), stream->GetPartitionId())].Stream = nullptr;
+ destroyPartitionStreamEvent->Confirm();
+ } else if (auto* closeSessionEvent = std::get_if<NYdb::NTopic::TSessionClosedEvent>(&event)) {
+ WRITE_LOG(params.Log, ELogPriority::TLOG_ERR, TStringBuilder() << "READER Session closed: '" << closeSessionEvent->DebugString() << "'\n");
+ *params.ErrorFlag = 1;
+ break;
+ } else if (auto* partitionStreamStatusEvent = std::get_if<NYdb::NTopic::TReadSessionEvent::TPartitionSessionStatusEvent>(&event)) {
+ WRITE_LOG(params.Log, ELogPriority::TLOG_DEBUG, TStringBuilder() << partitionStreamStatusEvent->DebugString() << "\n")
+
+ ui64 lagMessages = partitionStreamStatusEvent->GetEndOffset() - partitionStreamStatusEvent->GetCommittedOffset();
+ ui64 lagTime = lagMessages == 0 ? 0 : (Now() - partitionStreamStatusEvent->GetWriteTimeHighWatermark()).MilliSeconds();
+
+ params.StatsCollector->AddLagEvent(lagMessages, lagTime);
+ } else if (auto* ackEvent = std::get_if<NYdb::NTopic::TReadSessionEvent::TCommitOffsetAcknowledgementEvent>(&event)) {
+ WRITE_LOG(params.Log, ELogPriority::TLOG_DEBUG, TStringBuilder() << ackEvent->DebugString() << "\n");
}
- dataEvent->Commit();
- } else if (auto* createPartitionStreamEvent = std::get_if<NYdb::NTopic::TReadSessionEvent::TStartPartitionSessionEvent>(&*event)) {
- auto stream = createPartitionStreamEvent->GetPartitionSession();
- ui64 startOffset = streamState[std::make_pair(stream->GetTopicPath(), stream->GetPartitionId())].StartOffset;
- streamState[std::make_pair(stream->GetTopicPath(), stream->GetPartitionId())].Stream = stream;
- WRITE_LOG(params.Log,ELogPriority::TLOG_DEBUG, TStringBuilder() << "READER Starting read " << createPartitionStreamEvent->DebugString() << " from " << startOffset << "\n");
- createPartitionStreamEvent->Confirm();
- } else if (auto* destroyPartitionStreamEvent = std::get_if<NYdb::NTopic::TReadSessionEvent::TStopPartitionSessionEvent>(&*event)) {
- auto stream = destroyPartitionStreamEvent->GetPartitionSession();
- streamState[std::make_pair(stream->GetTopicPath(), stream->GetPartitionId())].Stream = nullptr;
- destroyPartitionStreamEvent->Confirm();
- } else if (auto* closeSessionEvent = std::get_if<NYdb::NTopic::TSessionClosedEvent>(&*event)) {
- WRITE_LOG(params.Log,ELogPriority::TLOG_ERR, TStringBuilder() << "READER Session closed: '" << closeSessionEvent->DebugString() << "'\n");
- *params.ErrorFlag = 1;
- break;
- } else if (auto* partitionStreamStatusEvent = std::get_if<NYdb::NTopic::TReadSessionEvent::TPartitionSessionStatusEvent>(&*event)) {
- WRITE_LOG(params.Log, ELogPriority::TLOG_DEBUG, TStringBuilder() << partitionStreamStatusEvent->DebugString() << "\n")
-
- ui64 lagMessages = partitionStreamStatusEvent->GetEndOffset() - partitionStreamStatusEvent->GetCommittedOffset();
- ui64 lagTime = lagMessages == 0 ? 0 : (Now() - partitionStreamStatusEvent->GetWriteTimeHighWatermark()).MilliSeconds();
-
- params.StatsCollector->AddLagEvent(lagMessages, lagTime);
- } else if (auto* ackEvent = std::get_if<NYdb::NTopic::TReadSessionEvent::TCommitOffsetAcknowledgementEvent>(&*event)) {
- WRITE_LOG(params.Log,ELogPriority::TLOG_DEBUG, TStringBuilder() << ackEvent->DebugString() << "\n");
}
}
} \ No newline at end of file
diff --git a/ydb/public/lib/ydb_cli/commands/topic_workload/topic_workload_run_full.cpp b/ydb/public/lib/ydb_cli/commands/topic_workload/topic_workload_run_full.cpp
index c6d5177ff28..32c134e1787 100644
--- a/ydb/public/lib/ydb_cli/commands/topic_workload/topic_workload_run_full.cpp
+++ b/ydb/public/lib/ydb_cli/commands/topic_workload/topic_workload_run_full.cpp
@@ -53,13 +53,13 @@ void TCommandWorkloadTopicRunFull::Config(TConfig& config) {
.StoreResult(&ConsumerCount);
config.Opts->AddLongOption('m', "message-size", "Message size.")
.DefaultValue(10_KB)
- .StoreResult(&MessageSize);
+ .StoreMappedResultT<TString>(&MessageSize, &TCommandWorkloadTopicParams::StrToBytes);
config.Opts->AddLongOption("message-rate", "Total message rate for all producer threads (messages per second). Exclusive with --byte-rate.")
.DefaultValue(0)
.StoreResult(&MessageRate);
config.Opts->AddLongOption("byte-rate", "Total message rate for all producer threads (bytes per second). Exclusive with --message-rate.")
.DefaultValue(0)
- .StoreResult(&ByteRate);
+ .StoreMappedResultT<TString>(&ByteRate, &TCommandWorkloadTopicParams::StrToBytes);
config.Opts->AddLongOption("codec", PrepareAllowedCodecsDescription("Client-side compression algorithm. When read, data will be uncompressed transparently with a codec used on write", InitAllowedCodecs()))
.Optional()
.DefaultValue((TStringBuilder() << NTopic::ECodec::RAW))
diff --git a/ydb/public/lib/ydb_cli/commands/topic_workload/topic_workload_run_write.cpp b/ydb/public/lib/ydb_cli/commands/topic_workload/topic_workload_run_write.cpp
index 22df051dfe2..143614811ac 100644
--- a/ydb/public/lib/ydb_cli/commands/topic_workload/topic_workload_run_write.cpp
+++ b/ydb/public/lib/ydb_cli/commands/topic_workload/topic_workload_run_write.cpp
@@ -46,13 +46,13 @@ void TCommandWorkloadTopicRunWrite::Config(TConfig& config) {
.StoreResult(&ProducerThreadCount);
config.Opts->AddLongOption('m', "message-size", "Message size.")
.DefaultValue(10_KB)
- .StoreResult(&MessageSize);
+ .StoreMappedResultT<TString>(&MessageSize, &TCommandWorkloadTopicParams::StrToBytes);
config.Opts->AddLongOption("message-rate", "Total message rate for all producer threads (messages per second). Exclusive with --byte-rate.")
.DefaultValue(0)
.StoreResult(&MessageRate);
config.Opts->AddLongOption("byte-rate", "Total message rate for all producer threads (bytes per second). Exclusive with --message-rate.")
.DefaultValue(0)
- .StoreResult(&ByteRate);
+ .StoreMappedResultT<TString>(&ByteRate, &TCommandWorkloadTopicParams::StrToBytes);
config.Opts->AddLongOption("codec", PrepareAllowedCodecsDescription("Client-side compression algorithm. When read, data will be uncompressed transparently with a codec used on write", InitAllowedCodecs()))
.Optional()
.DefaultValue((TStringBuilder() << NTopic::ECodec::RAW))
diff --git a/ydb/public/lib/ydb_cli/commands/topic_workload/ut/CMakeLists.darwin-x86_64.txt b/ydb/public/lib/ydb_cli/commands/topic_workload/ut/CMakeLists.darwin-x86_64.txt
new file mode 100644
index 00000000000..19b6700dae5
--- /dev/null
+++ b/ydb/public/lib/ydb_cli/commands/topic_workload/ut/CMakeLists.darwin-x86_64.txt
@@ -0,0 +1,67 @@
+
+# This file was generated by the build system used internally in the Yandex monorepo.
+# Only simple modifications are allowed (adding source-files to targets, adding simple properties
+# like target_include_directories). These modifications will be ported to original
+# ya.make files by maintainers. Any complex modifications which can't be ported back to the
+# original buildsystem will not be accepted.
+
+
+
+add_executable(ydb-public-lib-ydb_cli-commands-topic_workload-ut)
+target_include_directories(ydb-public-lib-ydb_cli-commands-topic_workload-ut PRIVATE
+ ${CMAKE_SOURCE_DIR}/ydb/public/lib/ydb_cli/commands/topic_workload
+)
+target_link_libraries(ydb-public-lib-ydb_cli-commands-topic_workload-ut PUBLIC
+ contrib-libs-cxxsupp
+ yutil
+ cpp-malloc-system
+ library-cpp-cpuid_check
+ cpp-testing-unittest_main
+ topic_workload
+ cpp-regex-pcre
+ cpp-getopt-small
+)
+target_link_options(ydb-public-lib-ydb_cli-commands-topic_workload-ut PRIVATE
+ -Wl,-platform_version,macos,11.0,11.0
+ -fPIC
+ -fPIC
+ -framework
+ CoreFoundation
+)
+target_sources(ydb-public-lib-ydb_cli-commands-topic_workload-ut PRIVATE
+ ${CMAKE_SOURCE_DIR}/ydb/public/lib/ydb_cli/commands/topic_workload/topic_workload_params_ut.cpp
+)
+set_property(
+ TARGET
+ ydb-public-lib-ydb_cli-commands-topic_workload-ut
+ PROPERTY
+ SPLIT_FACTOR
+ 10
+)
+add_yunittest(
+ NAME
+ ydb-public-lib-ydb_cli-commands-topic_workload-ut
+ TEST_TARGET
+ ydb-public-lib-ydb_cli-commands-topic_workload-ut
+ TEST_ARG
+ --print-before-suite
+ --print-before-test
+ --fork-tests
+ --print-times
+ --show-fails
+)
+set_yunittest_property(
+ TEST
+ ydb-public-lib-ydb_cli-commands-topic_workload-ut
+ PROPERTY
+ LABELS
+ SMALL
+)
+set_yunittest_property(
+ TEST
+ ydb-public-lib-ydb_cli-commands-topic_workload-ut
+ PROPERTY
+ PROCESSORS
+ 1
+)
+vcs_info(ydb-public-lib-ydb_cli-commands-topic_workload-ut)
diff --git a/ydb/public/lib/ydb_cli/commands/topic_workload/ut/CMakeLists.linux-aarch64.txt b/ydb/public/lib/ydb_cli/commands/topic_workload/ut/CMakeLists.linux-aarch64.txt
new file mode 100644
index 00000000000..5fc79e11e6c
--- /dev/null
+++ b/ydb/public/lib/ydb_cli/commands/topic_workload/ut/CMakeLists.linux-aarch64.txt
@@ -0,0 +1,70 @@
+
+# This file was generated by the build system used internally in the Yandex monorepo.
+# Only simple modifications are allowed (adding source-files to targets, adding simple properties
+# like target_include_directories). These modifications will be ported to original
+# ya.make files by maintainers. Any complex modifications which can't be ported back to the
+# original buildsystem will not be accepted.
+
+
+
+add_executable(ydb-public-lib-ydb_cli-commands-topic_workload-ut)
+target_include_directories(ydb-public-lib-ydb_cli-commands-topic_workload-ut PRIVATE
+ ${CMAKE_SOURCE_DIR}/ydb/public/lib/ydb_cli/commands/topic_workload
+)
+target_link_libraries(ydb-public-lib-ydb_cli-commands-topic_workload-ut PUBLIC
+ contrib-libs-linux-headers
+ contrib-libs-cxxsupp
+ yutil
+ cpp-malloc-jemalloc
+ cpp-testing-unittest_main
+ topic_workload
+ cpp-regex-pcre
+ cpp-getopt-small
+)
+target_link_options(ydb-public-lib-ydb_cli-commands-topic_workload-ut PRIVATE
+ -ldl
+ -lrt
+ -Wl,--no-as-needed
+ -fPIC
+ -fPIC
+ -lpthread
+ -lrt
+ -ldl
+)
+target_sources(ydb-public-lib-ydb_cli-commands-topic_workload-ut PRIVATE
+ ${CMAKE_SOURCE_DIR}/ydb/public/lib/ydb_cli/commands/topic_workload/topic_workload_params_ut.cpp
+)
+set_property(
+ TARGET
+ ydb-public-lib-ydb_cli-commands-topic_workload-ut
+ PROPERTY
+ SPLIT_FACTOR
+ 10
+)
+add_yunittest(
+ NAME
+ ydb-public-lib-ydb_cli-commands-topic_workload-ut
+ TEST_TARGET
+ ydb-public-lib-ydb_cli-commands-topic_workload-ut
+ TEST_ARG
+ --print-before-suite
+ --print-before-test
+ --fork-tests
+ --print-times
+ --show-fails
+)
+set_yunittest_property(
+ TEST
+ ydb-public-lib-ydb_cli-commands-topic_workload-ut
+ PROPERTY
+ LABELS
+ SMALL
+)
+set_yunittest_property(
+ TEST
+ ydb-public-lib-ydb_cli-commands-topic_workload-ut
+ PROPERTY
+ PROCESSORS
+ 1
+)
+vcs_info(ydb-public-lib-ydb_cli-commands-topic_workload-ut)
diff --git a/ydb/public/lib/ydb_cli/commands/topic_workload/ut/CMakeLists.linux-x86_64.txt b/ydb/public/lib/ydb_cli/commands/topic_workload/ut/CMakeLists.linux-x86_64.txt
new file mode 100644
index 00000000000..852ce301485
--- /dev/null
+++ b/ydb/public/lib/ydb_cli/commands/topic_workload/ut/CMakeLists.linux-x86_64.txt
@@ -0,0 +1,72 @@
+
+# This file was generated by the build system used internally in the Yandex monorepo.
+# Only simple modifications are allowed (adding source-files to targets, adding simple properties
+# like target_include_directories). These modifications will be ported to original
+# ya.make files by maintainers. Any complex modifications which can't be ported back to the
+# original buildsystem will not be accepted.
+
+
+
+add_executable(ydb-public-lib-ydb_cli-commands-topic_workload-ut)
+target_include_directories(ydb-public-lib-ydb_cli-commands-topic_workload-ut PRIVATE
+ ${CMAKE_SOURCE_DIR}/ydb/public/lib/ydb_cli/commands/topic_workload
+)
+target_link_libraries(ydb-public-lib-ydb_cli-commands-topic_workload-ut PUBLIC
+ contrib-libs-linux-headers
+ contrib-libs-cxxsupp
+ yutil
+ cpp-malloc-tcmalloc
+ libs-tcmalloc-no_percpu_cache
+ library-cpp-cpuid_check
+ cpp-testing-unittest_main
+ topic_workload
+ cpp-regex-pcre
+ cpp-getopt-small
+)
+target_link_options(ydb-public-lib-ydb_cli-commands-topic_workload-ut PRIVATE
+ -ldl
+ -lrt
+ -Wl,--no-as-needed
+ -fPIC
+ -fPIC
+ -lpthread
+ -lrt
+ -ldl
+)
+target_sources(ydb-public-lib-ydb_cli-commands-topic_workload-ut PRIVATE
+ ${CMAKE_SOURCE_DIR}/ydb/public/lib/ydb_cli/commands/topic_workload/topic_workload_params_ut.cpp
+)
+set_property(
+ TARGET
+ ydb-public-lib-ydb_cli-commands-topic_workload-ut
+ PROPERTY
+ SPLIT_FACTOR
+ 10
+)
+add_yunittest(
+ NAME
+ ydb-public-lib-ydb_cli-commands-topic_workload-ut
+ TEST_TARGET
+ ydb-public-lib-ydb_cli-commands-topic_workload-ut
+ TEST_ARG
+ --print-before-suite
+ --print-before-test
+ --fork-tests
+ --print-times
+ --show-fails
+)
+set_yunittest_property(
+ TEST
+ ydb-public-lib-ydb_cli-commands-topic_workload-ut
+ PROPERTY
+ LABELS
+ SMALL
+)
+set_yunittest_property(
+ TEST
+ ydb-public-lib-ydb_cli-commands-topic_workload-ut
+ PROPERTY
+ PROCESSORS
+ 1
+)
+vcs_info(ydb-public-lib-ydb_cli-commands-topic_workload-ut)
diff --git a/ydb/public/lib/ydb_cli/commands/topic_workload/ut/CMakeLists.txt b/ydb/public/lib/ydb_cli/commands/topic_workload/ut/CMakeLists.txt
new file mode 100644
index 00000000000..a692f90f36e
--- /dev/null
+++ b/ydb/public/lib/ydb_cli/commands/topic_workload/ut/CMakeLists.txt
@@ -0,0 +1,17 @@
+
+# This file was generated by the build system used internally in the Yandex monorepo.
+# Only simple modifications are allowed (adding source-files to targets, adding simple properties
+# like target_include_directories). These modifications will be ported to original
+# ya.make files by maintainers. Any complex modifications which can't be ported back to the
+# original buildsystem will not be accepted.
+
+
+if (CMAKE_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64")
+ include(CMakeLists.linux-aarch64.txt)
+elseif (CMAKE_SYSTEM_NAME STREQUAL "Darwin" AND CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64")
+ include(CMakeLists.darwin-x86_64.txt)
+elseif (WIN32 AND CMAKE_SYSTEM_PROCESSOR STREQUAL "AMD64" AND NOT HAVE_CUDA)
+ include(CMakeLists.windows-x86_64.txt)
+elseif (CMAKE_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" AND NOT HAVE_CUDA)
+ include(CMakeLists.linux-x86_64.txt)
+endif()
diff --git a/ydb/public/lib/ydb_cli/commands/topic_workload/ut/CMakeLists.windows-x86_64.txt b/ydb/public/lib/ydb_cli/commands/topic_workload/ut/CMakeLists.windows-x86_64.txt
new file mode 100644
index 00000000000..8c371e0b095
--- /dev/null
+++ b/ydb/public/lib/ydb_cli/commands/topic_workload/ut/CMakeLists.windows-x86_64.txt
@@ -0,0 +1,60 @@
+
+# This file was generated by the build system used internally in the Yandex monorepo.
+# Only simple modifications are allowed (adding source-files to targets, adding simple properties
+# like target_include_directories). These modifications will be ported to original
+# ya.make files by maintainers. Any complex modifications which can't be ported back to the
+# original buildsystem will not be accepted.
+
+
+
+add_executable(ydb-public-lib-ydb_cli-commands-topic_workload-ut)
+target_include_directories(ydb-public-lib-ydb_cli-commands-topic_workload-ut PRIVATE
+ ${CMAKE_SOURCE_DIR}/ydb/public/lib/ydb_cli/commands/topic_workload
+)
+target_link_libraries(ydb-public-lib-ydb_cli-commands-topic_workload-ut PUBLIC
+ contrib-libs-cxxsupp
+ yutil
+ cpp-malloc-system
+ library-cpp-cpuid_check
+ cpp-testing-unittest_main
+ topic_workload
+ cpp-regex-pcre
+ cpp-getopt-small
+)
+target_sources(ydb-public-lib-ydb_cli-commands-topic_workload-ut PRIVATE
+ ${CMAKE_SOURCE_DIR}/ydb/public/lib/ydb_cli/commands/topic_workload/topic_workload_params_ut.cpp
+)
+set_property(
+ TARGET
+ ydb-public-lib-ydb_cli-commands-topic_workload-ut
+ PROPERTY
+ SPLIT_FACTOR
+ 10
+)
+add_yunittest(
+ NAME
+ ydb-public-lib-ydb_cli-commands-topic_workload-ut
+ TEST_TARGET
+ ydb-public-lib-ydb_cli-commands-topic_workload-ut
+ TEST_ARG
+ --print-before-suite
+ --print-before-test
+ --fork-tests
+ --print-times
+ --show-fails
+)
+set_yunittest_property(
+ TEST
+ ydb-public-lib-ydb_cli-commands-topic_workload-ut
+ PROPERTY
+ LABELS
+ SMALL
+)
+set_yunittest_property(
+ TEST
+ ydb-public-lib-ydb_cli-commands-topic_workload-ut
+ PROPERTY
+ PROCESSORS
+ 1
+)
+vcs_info(ydb-public-lib-ydb_cli-commands-topic_workload-ut)