Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,4 +89,7 @@ jobs:
NotAccessedOutParameterVariable,
NotAccessedPrimaryConstructorParameterCompiler,
InconsistentNaming,
CollectionNeverUpdated.Global
CollectionNeverUpdated.Global,
CSharpErrors,
EmptyStatement,
ObjectCreationAsStatement
2 changes: 1 addition & 1 deletion slo/src/AdoNet/SloContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -105,4 +105,4 @@ protected override Task<YdbDataSource> CreateClient(Config config)
return Task.FromResult(new YdbDataSource(new YdbConnectionStringBuilder
{ UseTls = useTls, Host = host, Port = int.Parse(port), Database = config.Db, LoggerFactory = Factory }));
}
}
}
2 changes: 1 addition & 1 deletion slo/src/Internal/Cli.cs
Original file line number Diff line number Diff line change
Expand Up @@ -113,4 +113,4 @@ public static async Task<int> Run<T>(SloContext<T> sloContext, string[] args) wh

return await RootCommand.InvokeAsync(args);
}
}
}
34 changes: 13 additions & 21 deletions slo/src/Internal/SloContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,6 @@ public async Task Run(RunConfig runConfig)
}

await prometheus.StopAsync();
// await MetricReset(promPgwEndpoint);

Logger.LogInformation("Run task is finished");
return;
Expand Down Expand Up @@ -172,19 +171,19 @@ Task ShootingTask(RateLimiter rateLimitPolicy, string operationType,
{
Buckets =
[
0.001, // 1 ms
0.002, // 2 ms
0.003, // 3 ms
0.004, // 4 ms
0.005, // 5 ms
0.001, // 1 ms
0.002, // 2 ms
0.003, // 3 ms
0.004, // 4 ms
0.005, // 5 ms
0.0075, // 7.5 ms
0.010, // 10 ms
0.020, // 20 ms
0.050, // 50 ms
0.100, // 100 ms
0.200, // 200 ms
0.500, // 500 ms
1.000 // 1 s
0.010, // 10 ms
0.020, // 20 ms
0.050, // 50 ms
0.100, // 100 ms
0.200, // 200 ms
0.500, // 500 ms
1.000 // 1 s
]
}
);
Expand Down Expand Up @@ -248,13 +247,6 @@ Task ShootingTask(RateLimiter rateLimitPolicy, string operationType,
}
}

// private async Task MetricReset(string promPgwEndpoint)
// {
// var deleteUri = $"{promPgwEndpoint}/job/workload-{Job}";
// using var httpClient = new HttpClient();
// await httpClient.DeleteAsync(deleteUri);
// }

// return attempt count & StatusCode operation
protected abstract Task<(int, StatusCode)> Upsert(T client, string upsertSql,
Dictionary<string, YdbValue> parameters,
Expand Down Expand Up @@ -315,4 +307,4 @@ public static string StatusName(this StatusCode statusCode)
var prefix = statusCode >= StatusCode.ClientTransportResourceExhausted ? "GRPC" : "YDB";
return $"{prefix}_{statusCode}";
}
}
}
2 changes: 1 addition & 1 deletion slo/src/TableService/SloContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -81,4 +81,4 @@ protected override async Task<TableClient> CreateClient(Config config)
{
return new TableClient(await Driver.CreateInitialized(new DriverConfig(config.Endpoint, config.Db), Factory));
}
}
}
Loading