Beispiel #1
0
        private static int RunSyncExecutionTest(string payload, ITestClient testClient, int loopSize)
        {
            using (testClient)
            {
                testClient.Connect(_cs);

                testClient.FlushDb();
                var sw = new Stopwatch();
                sw.Start();

                for (var i = 0; i < loopSize; i++)
                {
                    testClient.Set(KeyName, payload);
                }

                var result = testClient.GetString(KeyName);

                if (result != payload)
                {
                    Console.Write("[condition failed Result == Payload] ");
                }

                sw.Stop();
                return((int)sw.ElapsedMilliseconds);
            }
        }
Beispiel #2
0
        private static int RunSyncExecutionTest(string payload, ITestClient testClient, int loopSize)
        {
            using (testClient)
            {
                testClient.Connect(_cs);

                testClient.FlushDb();
                var sw = new Stopwatch();
                sw.Start();

                for (var i = 0; i < loopSize; i++)
                    testClient.Set(KeyName, payload);

                var result = testClient.GetString(KeyName);

                if (result != payload)
                    Console.Write("[condition failed Result == Payload] ");

                sw.Stop();
                return (int)sw.ElapsedMilliseconds;
            }
        }