Going to re-use the multi-node testkit for running this benchmark
示例#1
0
        static void Main(string[] args)
        {
            HeliosTrace.SetWriter(HeliosCounterTraceWriter.Instance);
            var harness = new TcpHarness();
            harness.SetUp();
            Console.WriteLine("Helios TCP Client --> Server Reliability benchmark");
            Console.WriteLine("TCP is a reliable protocol, so this should never be a problem. Buuuuuuuuut concurrent programming.");
            Console.WriteLine("Testing delivery rate of {0} messages round trip", harness.BufferSize);
            Console.WriteLine("Client.Write --> Server.Receive --> Server.Write --> Client.Receive");
            Console.WriteLine("200b payload size");
            Console.WriteLine();
            Console.WriteLine("--------------- GO ---------------");
            var sw = Stopwatch.StartNew();
            harness.RunBenchmark();
            sw.Stop();
            Console.WriteLine("Trips completed in {0} ms", sw.ElapsedMilliseconds);
            harness.CleanUp();
			var counters = HeliosCounterTraceWriter.Instance.Counter;
            Console.WriteLine("Checking counters");
        }
示例#2
0
        static void Main(string[] args)
        {
            HeliosTrace.SetWriter(HeliosCounterTraceWriter.Instance);
            var harness = new TcpHarness();

            harness.SetUp();
            Console.WriteLine("Helios TCP Client --> Server Reliability benchmark");
            Console.WriteLine("TCP is a reliable protocol, so this should never be a problem. Buuuuuuuuut concurrent programming.");
            Console.WriteLine("Testing delivery rate of {0} messages round trip", harness.BufferSize);
            Console.WriteLine("Client.Write --> Server.Receive --> Server.Write --> Client.Receive");
            Console.WriteLine("200b payload size");
            Console.WriteLine();
            Console.WriteLine("--------------- GO ---------------");
            var sw = Stopwatch.StartNew();

            harness.RunBenchmark();
            sw.Stop();
            Console.WriteLine("Trips completed in {0} ms", sw.ElapsedMilliseconds);
            harness.CleanUp();
            var counters = HeliosCounterTraceWriter.Instance.Counter;

            Console.WriteLine("Checking counters");
        }