@@ -61,46 +61,43 @@ 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 ("--path" , default = "/local/slo_topic" , type = str , help = "Topic path" )
69
+ topic_create_parser .add_argument ("--consumer" , default = "slo_consumer" , type = str , help = "Topic consumer name" )
70
+ topic_create_parser .add_argument ("--partitions-count" , default = 1 , type = int , help = "Partition count" )
71
+
72
+
64
73
def make_topic_run_parser (subparsers ):
65
- """Создает парсер для команды topic-run - запуск SLO тестов для топиков"""
66
74
topic_parser = subparsers .add_parser ("topic-run" , help = "Run topic SLO workload" )
67
75
add_common_options (topic_parser )
68
76
69
- topic_parser .add_argument ("--topic-read-rps" , default = 50 , type = int , help = "Topic read request rps" )
70
- topic_parser .add_argument ("--topic-read-timeout" , default = 5000 , type = int , help = "Topic read timeout [ms]" )
71
- topic_parser .add_argument ("--topic-write-rps" , default = 20 , type = int , help = "Topic write request rps" )
72
- topic_parser .add_argument ("--topic-write-timeout" , default = 10000 , type = int , help = "Topic write timeout [ms]" )
73
- topic_parser .add_argument ("--topic-read-threads" , default = 1 , type = int , help = "Number of threads for topic reading" )
74
- 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
- topic_parser .add_argument ("--topic-consumer" , default = "slo_consumer" , type = str , help = "Topic consumer name" )
77
- topic_parser .add_argument ("--topic-message-size" , default = 100 , type = int , help = "Topic message size in bytes" )
78
- topic_parser .add_argument ("--topic-min-partitions" , default = 1 , type = int , help = "Minimum active partitions" )
79
- topic_parser .add_argument ("--topic-max-partitions" , default = 10 , type = int , help = "Maximum active partitions" )
80
- topic_parser .add_argument ("--topic-retention-hours" , default = 24 , type = int , help = "Retention period in hours" )
81
-
82
- topic_parser .add_argument ("--time" , default = 60 , type = int , help = "Time to run in seconds" )
77
+ topic_parser .add_argument ("--path" , default = "/local/slo_topic" , type = str , help = "Topic path" )
78
+ topic_parser .add_argument ("--consumer" , default = "slo_consumer" , type = str , help = "Topic consumer name" )
79
+ topic_parser .add_argument ("--partitions-count" , default = 1 , type = int , help = "Partition count" )
80
+ topic_parser .add_argument ("--read-rps" , default = 100 , type = int , help = "Topic read request rps" )
81
+ topic_parser .add_argument ("--read-timeout" , default = 5000 , type = int , help = "Topic read timeout [ms]" )
82
+ topic_parser .add_argument ("--write-rps" , default = 100 , type = int , help = "Topic write request rps" )
83
+ topic_parser .add_argument ("--write-timeout" , default = 5000 , type = int , help = "Topic write timeout [ms]" )
84
+ topic_parser .add_argument ("--read-threads" , default = 1 , type = int , help = "Number of threads for topic reading" )
85
+ topic_parser .add_argument ("--write-threads" , default = 1 , type = int , help = "Number of threads for topic writing" )
86
+ topic_parser .add_argument ("--message-size" , default = 100 , type = int , help = "Topic message size in bytes" )
87
+
88
+ topic_parser .add_argument ("--time" , default = 10 , type = int , help = "Time to run in seconds" )
83
89
topic_parser .add_argument ("--shutdown-time" , default = 10 , type = int , help = "Graceful shutdown time in seconds" )
84
- topic_parser .add_argument ("--prom-pgw" , default = "" , type = str , help = "Prometheus push gateway (empty to disable)" )
90
+ topic_parser .add_argument (
91
+ "--prom-pgw" , default = "localhost:9091" , type = str , help = "Prometheus push gateway (empty to disable)"
92
+ )
85
93
topic_parser .add_argument ("--report-period" , default = 1000 , type = int , help = "Prometheus push period in [ms]" )
86
94
87
95
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
96
def make_topic_cleanup_parser (subparsers ):
100
97
topic_cleanup_parser = subparsers .add_parser ("topic-cleanup" , help = "Drop topic" )
101
98
add_common_options (topic_cleanup_parser )
102
99
103
- topic_cleanup_parser .add_argument ("--topic- path" , default = "/local/slo_topic" , type = str , help = "Topic path" )
100
+ topic_cleanup_parser .add_argument ("--path" , default = "/local/slo_topic" , type = str , help = "Topic path" )
104
101
105
102
106
103
def get_root_parser ():
0 commit comments