@@ -61,18 +61,29 @@ def make_table_cleanup_parser(subparsers):
61
61
add_common_options (table_cleanup_parser )
62
62
63
63
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
+
64
75
def make_topic_run_parser (subparsers ):
65
76
"""Создает парсер для команды topic-run - запуск SLO тестов для топиков"""
66
77
topic_parser = subparsers .add_parser ("topic-run" , help = "Run topic SLO workload" )
67
78
add_common_options (topic_parser )
68
79
80
+ topic_parser .add_argument ("--topic-path" , default = "/local/slo_topic" , type = str , help = "Topic path" )
69
81
topic_parser .add_argument ("--topic-read-rps" , default = 50 , type = int , help = "Topic read request rps" )
70
82
topic_parser .add_argument ("--topic-read-timeout" , default = 5000 , type = int , help = "Topic read timeout [ms]" )
71
83
topic_parser .add_argument ("--topic-write-rps" , default = 20 , type = int , help = "Topic write request rps" )
72
84
topic_parser .add_argument ("--topic-write-timeout" , default = 10000 , type = int , help = "Topic write timeout [ms]" )
73
85
topic_parser .add_argument ("--topic-read-threads" , default = 1 , type = int , help = "Number of threads for topic reading" )
74
86
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" )
76
87
topic_parser .add_argument ("--topic-consumer" , default = "slo_consumer" , type = str , help = "Topic consumer name" )
77
88
topic_parser .add_argument ("--topic-message-size" , default = 100 , type = int , help = "Topic message size in bytes" )
78
89
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):
85
96
topic_parser .add_argument ("--report-period" , default = 1000 , type = int , help = "Prometheus push period in [ms]" )
86
97
87
98
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
-
99
99
def make_topic_cleanup_parser (subparsers ):
100
100
topic_cleanup_parser = subparsers .add_parser ("topic-cleanup" , help = "Drop topic" )
101
101
add_common_options (topic_cleanup_parser )
0 commit comments