Skip to content

Commit

Permalink
slo fix cli
Browse files Browse the repository at this point in the history
  • Loading branch information
XmasApple committed Sep 4, 2023
1 parent 2f2dd3d commit bd224cb
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 14 deletions.
5 changes: 4 additions & 1 deletion slo/playground/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
26 changes: 13 additions & 13 deletions slo/src/Cli/Cli.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,68 +13,68 @@ internal static class Cli
"YDB database to connect to");

private static readonly Option<string> TableOption = new(
new[] { "-t", "-table-name" },
new[] { "-t", "--table-name" },
() => "testingTable",
"table name to create\n ");

private static readonly Option<int> WriteTimeoutOption = new(
"-write-timeout",
"--write-timeout",
() => 10000,
"write timeout milliseconds");


private static readonly Option<int> MinPartitionsCountOption = new(
"-min-partitions-count",
"--min-partitions-count",
() => 6,
"minimum amount of partitions in table");

private static readonly Option<int> MaxPartitionsCountOption = new(
"-max-partitions-count",
"--max-partitions-count",
() => 1000,
"maximum amount of partitions in table");

private static readonly Option<int> PartitionSizeOption = new(
"-partition-size",
"--partition-size",
() => 1,
"partition size in mb");

private static readonly Option<int> InitialDataCountOption = new(
new[] { "-c", "-initial-data-count" },
new[] { "-c", "--initial-data-count" },
() => 1000,
"amount of initially created rows");


private static readonly Option<string> PromPgwOption = new(
"-prom-pgw",
"--prom-pgw",
"minimum amount of partitions in table") { IsRequired = true };

private static readonly Option<int> ReportPeriodOption = new(
"-report-period",
"--report-period",
() => 250,
"prometheus push period in milliseconds");

private static readonly Option<int> ReadRpsOption = new(
"-read-rps",
"--read-rps",
() => 1000,
"read RPS");

private static readonly Option<int> ReadTimeoutOption = new(
"-read-timeout",
"--read-timeout",
() => 10000,
"read timeout milliseconds");

private static readonly Option<int> WriteRpsOption = new(
"-write-rps",
"--write-rps",
() => 100,
"write RPS");

private static readonly Option<int> TimeOption = new(
"-time",
"--time",
() => 600,
"run time in seconds");

private static readonly Option<int> ShutdownTimeOption = new(
"-shutdown-time",
"--shutdown-time",
() => 30,
"time to wait before force kill workers");

Expand Down

0 comments on commit bd224cb

Please sign in to comment.