Example #1
0
        public void TestStringBandwidth()
        {
            var test = new OutputBandwithTest <string>(
                channel: _channel,
                contract: _proxy,
                dataGenerator: Helper.GenerateString,
                sendProcedure: (iterations, packet) =>
            {
                for (int i = 0; i < iterations; i++)
                {
                    _proxy.SayString(packet);
                }
            });

            _output.WriteLine("Strting serialization Test");
            _output.WriteLine("Packet [chars]" + OutputBandwithTestResults.GetTabbedHeader());

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