FlushAll() public method

public FlushAll ( ) : void
return void
        public void Run(string name, int nBlockSizeBytes, Action<int, byte[]> fn)
        {
            Stopwatch sw;
            long ms1, ms2, interval;
            int nBytesHandled = 0;
            int nMaxIterations = 5;
            byte[] pBuffer = new byte[nBlockSizeBytes];

            // Create Redis Wrapper
            var redis = new RedisNativeClient();

            // Clear DB
            redis.FlushAll();

            sw = Stopwatch.StartNew();
            ms1 = sw.ElapsedMilliseconds;
            for (int i = 0; i < nMaxIterations; i++)
            {
                fn(i, pBuffer);
                nBytesHandled += nBlockSizeBytes;
            }

            ms2 = sw.ElapsedMilliseconds;
            interval = ms2 - ms1;

            // Calculate rate
            double dMBPerSEc = nBytesHandled / 1024.0 / 1024.0 / (interval / 1000.0);
            Console.WriteLine(name + ": Rate {0:N4}, Total: {1}ms", dMBPerSEc, ms2);
        }