@@ -61,18 +61,29 @@ def make_table_cleanup_parser(subparsers):
6161 add_common_options (table_cleanup_parser )
6262
6363
64+ def make_topic_create_parser (subparsers ):
65+ topic_create_parser = subparsers .add_parser ("topic-create" , help = "Create topic with consumer" )
66+ add_common_options (topic_create_parser )
67+
68+ topic_create_parser .add_argument ("--topic-path" , default = "/local/slo_topic" , type = str , help = "Topic path" )
69+ topic_create_parser .add_argument ("--topic-consumer" , default = "slo_consumer" , type = str , help = "Topic consumer name" )
70+ topic_create_parser .add_argument ("--topic-min-partitions" , default = 1 , type = int , help = "Minimum active partitions" )
71+ topic_create_parser .add_argument ("--topic-max-partitions" , default = 10 , type = int , help = "Maximum active partitions" )
72+ topic_create_parser .add_argument ("--topic-retention-hours" , default = 24 , type = int , help = "Retention period in hours" )
73+
74+
6475def make_topic_run_parser (subparsers ):
6576 """Создает парсер для команды topic-run - запуск SLO тестов для топиков"""
6677 topic_parser = subparsers .add_parser ("topic-run" , help = "Run topic SLO workload" )
6778 add_common_options (topic_parser )
6879
80+ topic_parser .add_argument ("--topic-path" , default = "/local/slo_topic" , type = str , help = "Topic path" )
6981 topic_parser .add_argument ("--topic-read-rps" , default = 50 , type = int , help = "Topic read request rps" )
7082 topic_parser .add_argument ("--topic-read-timeout" , default = 5000 , type = int , help = "Topic read timeout [ms]" )
7183 topic_parser .add_argument ("--topic-write-rps" , default = 20 , type = int , help = "Topic write request rps" )
7284 topic_parser .add_argument ("--topic-write-timeout" , default = 10000 , type = int , help = "Topic write timeout [ms]" )
7385 topic_parser .add_argument ("--topic-read-threads" , default = 1 , type = int , help = "Number of threads for topic reading" )
7486 topic_parser .add_argument ("--topic-write-threads" , default = 1 , type = int , help = "Number of threads for topic writing" )
75- topic_parser .add_argument ("--topic-path" , default = "/local/slo_topic" , type = str , help = "Topic path" )
7687 topic_parser .add_argument ("--topic-consumer" , default = "slo_consumer" , type = str , help = "Topic consumer name" )
7788 topic_parser .add_argument ("--topic-message-size" , default = 100 , type = int , help = "Topic message size in bytes" )
7889 topic_parser .add_argument ("--topic-min-partitions" , default = 1 , type = int , help = "Minimum active partitions" )
@@ -85,17 +96,6 @@ def make_topic_run_parser(subparsers):
8596 topic_parser .add_argument ("--report-period" , default = 1000 , type = int , help = "Prometheus push period in [ms]" )
8697
8798
88- def make_topic_create_parser (subparsers ):
89- topic_create_parser = subparsers .add_parser ("topic-create" , help = "Create topic with consumer" )
90- add_common_options (topic_create_parser )
91-
92- topic_create_parser .add_argument ("--topic-path" , default = "/local/slo_topic" , type = str , help = "Topic path" )
93- topic_create_parser .add_argument ("--topic-consumer" , default = "slo_consumer" , type = str , help = "Topic consumer name" )
94- topic_create_parser .add_argument ("--topic-min-partitions" , default = 1 , type = int , help = "Minimum active partitions" )
95- topic_create_parser .add_argument ("--topic-max-partitions" , default = 10 , type = int , help = "Maximum active partitions" )
96- topic_create_parser .add_argument ("--topic-retention-hours" , default = 24 , type = int , help = "Retention period in hours" )
97-
98-
9999def make_topic_cleanup_parser (subparsers ):
100100 topic_cleanup_parser = subparsers .add_parser ("topic-cleanup" , help = "Drop topic" )
101101 add_common_options (topic_cleanup_parser )
0 commit comments