From bd224cbb137b7a7026fbec6db38fcdc2885df91f Mon Sep 17 00:00:00 2001 From: XmasApple Date: Mon, 4 Sep 2023 14:07:21 +0300 Subject: [PATCH] slo fix cli --- slo/playground/docker-compose.yml | 5 ++++- slo/src/Cli/Cli.cs | 26 +++++++++++++------------- 2 files changed, 17 insertions(+), 14 deletions(-) diff --git a/slo/playground/docker-compose.yml b/slo/playground/docker-compose.yml index ef0c563a..74840583 100644 --- a/slo/playground/docker-compose.yml +++ b/slo/playground/docker-compose.yml @@ -74,7 +74,10 @@ services: - 'run' - 'http://ydb:2136' - '/local' - - '-prom-pgw=http://prometheus-pushgateway:9091/metrics' + - '--prom-pgw' + - 'http://prometheus-pushgateway:9091/metrics' + - '--table-name' + - 'slo-dotnet' networks: - monitor-net depends_on: diff --git a/slo/src/Cli/Cli.cs b/slo/src/Cli/Cli.cs index 80ef6b02..5c5f9267 100644 --- a/slo/src/Cli/Cli.cs +++ b/slo/src/Cli/Cli.cs @@ -13,68 +13,68 @@ internal static class Cli "YDB database to connect to"); private static readonly Option TableOption = new( - new[] { "-t", "-table-name" }, + new[] { "-t", "--table-name" }, () => "testingTable", "table name to create\n "); private static readonly Option WriteTimeoutOption = new( - "-write-timeout", + "--write-timeout", () => 10000, "write timeout milliseconds"); private static readonly Option MinPartitionsCountOption = new( - "-min-partitions-count", + "--min-partitions-count", () => 6, "minimum amount of partitions in table"); private static readonly Option MaxPartitionsCountOption = new( - "-max-partitions-count", + "--max-partitions-count", () => 1000, "maximum amount of partitions in table"); private static readonly Option PartitionSizeOption = new( - "-partition-size", + "--partition-size", () => 1, "partition size in mb"); private static readonly Option InitialDataCountOption = new( - new[] { "-c", "-initial-data-count" }, + new[] { "-c", "--initial-data-count" }, () => 1000, "amount of initially created rows"); private static readonly Option PromPgwOption = new( - "-prom-pgw", + "--prom-pgw", "minimum amount of partitions in table") { IsRequired = true }; private static readonly Option ReportPeriodOption = new( - "-report-period", + "--report-period", () => 250, "prometheus push period in milliseconds"); private static readonly Option ReadRpsOption = new( - "-read-rps", + "--read-rps", () => 1000, "read RPS"); private static readonly Option ReadTimeoutOption = new( - "-read-timeout", + "--read-timeout", () => 10000, "read timeout milliseconds"); private static readonly Option WriteRpsOption = new( - "-write-rps", + "--write-rps", () => 100, "write RPS"); private static readonly Option TimeOption = new( - "-time", + "--time", () => 600, "run time in seconds"); private static readonly Option ShutdownTimeOption = new( - "-shutdown-time", + "--shutdown-time", () => 30, "time to wait before force kill workers");