Пример #1
0
 private static void Lru2QStorageTest()
 {
     Core.Log.Warning("LRU2QStorage Test");
     using (var sto = new LRU2QStorage(20000))
     {
         sto.Init();
         Core.Log.InfoBasic("Press ENTER to start the test.");
         Console.ReadLine();
         ApplyTest(sto);
     }
 }
Пример #2
0
            protected override StorageManager GetManager()
            {
                var fileSto = new FileStorage("./cache_data")
                {
                    NumberOfSubFolders = 10
                };
                var lruSto     = new LRU2QStorage(10000);
                var stoManager = new StorageManager();

                stoManager.Push(fileSto);
                stoManager.Push(lruSto);
                return(stoManager);
            }
Пример #3
0
 private static void CombinedTest()
 {
     Core.Log.Warning("Combined Test");
     using (var sto = new LRU2QStorage(20000))
     {
         sto.Init();
         using (var fSto = new FileStorage("./data2"))
         {
             fSto.Init();
             var stoManager = new StorageManager();
             stoManager.Push(fSto);
             stoManager.Push(sto);
             Core.Log.InfoBasic("Press ENTER to start the test.");
             Console.ReadLine();
             ApplyTest(stoManager);
         }
     }
 }