|
|
@ -71,19 +71,6 @@ namespace Grpc.IntegrationTesting |
|
|
|
|
|
|
|
|
|
|
|
[Option("metrics_port", Default = 8081)] |
|
|
|
[Option("metrics_port", Default = 8081)] |
|
|
|
public int MetricsPort { get; set; } |
|
|
|
public int MetricsPort { get; set; } |
|
|
|
|
|
|
|
|
|
|
|
[HelpOption] |
|
|
|
|
|
|
|
public string GetUsage() |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
var help = new HelpText |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
Heading = "gRPC C# stress test client", |
|
|
|
|
|
|
|
AddDashesToOption = true |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
help.AddPreOptionsLine("Usage:"); |
|
|
|
|
|
|
|
help.AddOptions(this); |
|
|
|
|
|
|
|
return help; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
ClientOptions options; |
|
|
|
ClientOptions options; |
|
|
@ -105,12 +92,9 @@ namespace Grpc.IntegrationTesting |
|
|
|
|
|
|
|
|
|
|
|
public static void Run(string[] args) |
|
|
|
public static void Run(string[] args) |
|
|
|
{ |
|
|
|
{ |
|
|
|
var options = new ClientOptions(); |
|
|
|
var parserResult = Parser.Default.ParseArguments<ClientOptions>(args) |
|
|
|
if (!Parser.Default.ParseArguments(args, options)) |
|
|
|
.WithNotParsed((x) => Environment.Exit(1)) |
|
|
|
{ |
|
|
|
.WithParsed(options => { |
|
|
|
Environment.Exit(1); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
GrpcPreconditions.CheckArgument(options.NumChannelsPerServer > 0); |
|
|
|
GrpcPreconditions.CheckArgument(options.NumChannelsPerServer > 0); |
|
|
|
GrpcPreconditions.CheckArgument(options.NumStubsPerChannel > 0); |
|
|
|
GrpcPreconditions.CheckArgument(options.NumStubsPerChannel > 0); |
|
|
|
|
|
|
|
|
|
|
@ -122,6 +106,7 @@ namespace Grpc.IntegrationTesting |
|
|
|
|
|
|
|
|
|
|
|
var interopClient = new StressTestClient(options, serverAddresses.ToList(), testCases); |
|
|
|
var interopClient = new StressTestClient(options, serverAddresses.ToList(), testCases); |
|
|
|
interopClient.Run().Wait(); |
|
|
|
interopClient.Run().Wait(); |
|
|
|
|
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
async Task Run() |
|
|
|
async Task Run() |
|
|
|