Skip to content

Instantly share code, notes, and snippets.

@MoimHossain
Created September 2, 2019 09:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MoimHossain/a1e41c112f3f03c2b2e3d4ae1a41ffea to your computer and use it in GitHub Desktop.
Save MoimHossain/a1e41c112f3f03c2b2e3d4ae1a41ffea to your computer and use it in GitHub Desktop.
using (var wcf =
WcfService.DefaultFactory.CreateChannel<IWcf>(IP, port, (t) => { return "MyService"; }, "WcfServices"))
{
var count = 100;
var runAgain = false;
do
{
Console.Clear();
Console.WriteLine("How many iterations you want to perform?");
if (!Int32.TryParse(Console.ReadLine(), out count))
{
count = 10;
}
perfCount = count;
instance = wcf;
//BenchmarkDotNet.Running.BenchmarkRunner.Run<Program>();
NetworkThroughputBenchmark.Perform(new Action(new Program().Execute), perfCount);
Console.ResetColor();
Console.WriteLine("Press [A] to run again...");
runAgain = (Console.ReadKey(intercept: true).Key == ConsoleKey.A);
} while (runAgain);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment