Example #1
0
        public void TestBandwidth()
        {
            var test = new OutputBandwithTest <byte[]>(
                channel: _channel,
                contract: _proxy,
                dataGenerator: Helper.GenerateArray,
                sendProcedure: (iterations, packet) =>
            {
                for (int i = 0; i < iterations; i++)
                {
                    _proxy.SayBytes(packet);
                }
            });

            _output.WriteLine("Bandwidth Test");
            _output.WriteLine("Packet [bytes]" + OutputBandwithTestResults.GetTabbedHeader());

            MeasureBandWidth(test, 1, 100000);
            MeasureBandWidth(test, 100, 10000);
            MeasureBandWidth(test, 1000, 10000);
            MeasureBandWidth(test, 60000, 1000);
            MeasureBandWidth(test, 100000, 1000);
            MeasureBandWidth(test, 500000, 500);
            MeasureBandWidth(test, 1000000, 50);
        }