Exemple #1
0
 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)
         );
 }
Exemple #2
0
        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)
                );
        }
Exemple #3
0
 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();
         }
     }
 }