@@ -61,46 +61,41 @@ 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 ("--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+
6473def make_topic_run_parser (subparsers ):
65- """Создает парсер для команды topic-run - запуск SLO тестов для топиков"""
6674 topic_parser = subparsers .add_parser ("topic-run" , help = "Run topic SLO workload" )
6775 add_common_options (topic_parser )
6876
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" )
8389 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 ("--prom-pgw" , default = "localhost:9091 " , type = str , help = "Prometheus push gateway (empty to disable)" )
8591 topic_parser .add_argument ("--report-period" , default = 1000 , type = int , help = "Prometheus push period in [ms]" )
8692
8793
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-
9994def make_topic_cleanup_parser (subparsers ):
10095 topic_cleanup_parser = subparsers .add_parser ("topic-cleanup" , help = "Drop topic" )
10196 add_common_options (topic_cleanup_parser )
10297
103- topic_cleanup_parser .add_argument ("--topic- path" , default = "/local/slo_topic" , type = str , help = "Topic path" )
98+ topic_cleanup_parser .add_argument ("--path" , default = "/local/slo_topic" , type = str , help = "Topic path" )
10499
105100
106101def get_root_parser ():
0 commit comments