This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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