Ejemplo n.º 1
0
        private static long TestSqlDiskWrite(int length)
        {
            var client = new SqlDiskCacheClient("cache");

            var sw = Stopwatch.StartNew();

            for (int i = 0; i < length; i++)
            {
                client.Store("asdfasdf" + i.ToString(), stringToTest);
            }

            sw.Stop();
            return sw.ElapsedMilliseconds;
        }
Ejemplo n.º 2
0
        private static long TestSqlDiskRead(int length)
        {
            var client = new SqlDiskCacheClient("cache");

            var sw = Stopwatch.StartNew();

            for (int i = 0; i < length; i++)
            {
                var result = client.ExecuteGet("asdfasdf" + i.ToString());
                //if (result != stringToTest) throw new Exception();
            }

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