示例#1
0
        public void CouldEchoTransactionSpec()
        {
            var t      = new Transaction();
            var echoed = _df.Echo(t).Result;

            Console.WriteLine(t.ToJson());
            Console.WriteLine(echoed.ToJson());
            Assert.AreEqual(t.ToJson(), echoed.ToJson());
        }
示例#2
0
        public static void EchoTransaction()
        {
            var _df = new DebugFunctions(Quik.DefaultPort);

            var sw = new Stopwatch();

            Console.WriteLine("Started");
            for (int round = 0; round < 10; round++)
            {
                sw.Reset();
                sw.Start();

                var count = 10000;
                var t     = new Transaction();

                var array = new Task <Transaction> [count];
                for (int i = 0; i < array.Length; i++)
                {
                    array[i] = _df.Echo(t);
                }
                for (int i = 0; i < array.Length; i++)
                {
                    var res = array[i].Result;
                    array[i] = null;
                }

                sw.Stop();
                Console.WriteLine("MultiPing takes msecs: " + sw.ElapsedMilliseconds);
            }
            Console.WriteLine("Finished");
            Console.ReadKey();
        }
示例#3
0
        public static void EchoTransaction() {
            var _df = new DebugFunctions(Quik.DefaultPort);

            var sw = new Stopwatch();
            Console.WriteLine("Started");
            for (int round = 0; round < 10; round++) {
                sw.Reset();
                sw.Start();

                var count = 10000;
                var t = new Transaction();

                var array = new Task<Transaction>[count];
                for (int i = 0; i < array.Length; i++) {
                    array[i] = _df.Echo(t);
                }
                for (int i = 0; i < array.Length; i++) {
                    var res = array[i].Result;
                    array[i] = null;
                }

                sw.Stop();
                Console.WriteLine("MultiPing takes msecs: " + sw.ElapsedMilliseconds);
            }
            Console.WriteLine("Finished");
            Console.ReadKey();
        }
示例#4
0
文件: Ping.cs 项目: spvik/QuikSharp
        public void EchoWorks()
        {
            var echo = _df.Echo("echo").Result;

            Assert.AreEqual("echo", echo);
        }