private static void RunBulk(Options options, BulkOptions verbOptions) { LoadTestRunner.Run( options, verbOptions, p => new BulkServer(p, ParseUtils.ParseSize(verbOptions.BlockSize).Value, verbOptions.BlockCount), p => new BulkClient(p, ParseUtils.ParseSize(verbOptions.BlockSize).Value, verbOptions.BlockCount) ); }
private static void RunEcho(Options options, EchoOptions verbOptions) { var buffer = new byte[ParseUtils.ParseSize(verbOptions.BlockSize).Value]; new Random().NextBytes(buffer); LoadTestRunner.Run( options, verbOptions, p => new EchoServer(p), p => new EchoClient(p, buffer, verbOptions.BlockCount) ); }
public static void Run(Options options, LoadTestOptions verbOptions, Func <IPEndPoint, FastServer> serverFactory, Func <IPEndPoint, FastClient> clientFactory) { using (var runner = new LoadTestRunner(options, verbOptions, serverFactory, clientFactory)) { if (verbOptions.ExternalProxy) { runner.RunExternal(); } else { runner.Run(); } } }