Beispiel #1
0
        public static async Task RunAsync(TestHelper helper)
        {
            Communicator communicator = helper.Communicator !;

            System.IO.TextWriter output = helper.Output;

#if DEBUG
            output.WriteLine("warning: performance test built with DEBUG");
#endif

            var perf = IPerformancePrx.Parse(helper.GetTestProxy("perf", 0), communicator);

            RunTest(output, 10000, "latency", () => perf.IcePing());
            RunTest <byte>(output, 1000, "sending byte sequence", v => perf.SendBytes(v), Constants.ByteSeqSize);
            RunTest <byte>(output, 1000, "received byte sequence", sz => perf.ReceiveBytes(sz), Constants.ByteSeqSize);

            await perf.ShutdownAsync();
        }
Beispiel #2
0
        public static IPerformancePrx allTests(TestHelper helper)
        {
            Communicator communicator = helper.Communicator() !;

            TestHelper.Assert(communicator != null);
            System.IO.TextWriter output = helper.GetWriter();

#if DEBUG
            output.WriteLine("warning: performance test built with DEBUG");
#endif

            var perf = IPerformancePrx.Parse("perf:" + helper.GetTestEndpoint(0), communicator);

            RunTest(output, 10000, "latency", () => perf.IcePing());
            RunTest <byte>(output, 1000, "sending byte sequence", v => perf.sendBytes(v), Constants.ByteSeqSize);
            RunTest <byte>(output, 1000, "received byte sequence", sz => perf.receiveBytes(sz), Constants.ByteSeqSize);

            return(perf);
        }