Пример #1
0
 private static void MultipleSourceCachedCascade(System.Random Rand)
 {
     foreach (Employee3 Employee3 in 100.Times(x => Rand.NextClass <Employee3>()))
     {
         Employee3.Boss = Rand.NextClass <Employee3>();
         using (Utilities.Profiler.Profiler Profiler = new Utilities.Profiler.Profiler("Multiple Source Cached Cascade Save"))
         {
             Employee3.Save();
         }
     }
     for (int x = 0; x < 100; ++x)
     {
         using (Utilities.Profiler.Profiler Profiler = new Utilities.Profiler.Profiler("Multiple Source Cached Cascade All"))
         {
             Employee3.All().ForEach(y => { var Temp = y.Boss; });
         }
     }
     for (int x = 0; x < 100; ++x)
     {
         using (Utilities.Profiler.Profiler Profiler = new Utilities.Profiler.Profiler("Multiple Source Cached Cascade Any"))
         {
             var Temp = Employee3.Any().Boss;
         }
     }
     for (int x = 0; x < 100; ++x)
     {
         using (Utilities.Profiler.Profiler Profiler = new Utilities.Profiler.Profiler("Multiple Source Cached Cascade Paged"))
         {
             Employee3.Paged().ForEach(y => { var Temp = y.Boss; });
         }
     }
 }
Пример #2
0
 private static void MultipleSourceCached(System.Random Rand)
 {
     foreach (Employee2 Employee2 in 100.Times(x => Rand.NextClass <Employee2>()))
     {
         using (Utilities.Profiler.Profiler Profiler = new Utilities.Profiler.Profiler("Multiple Source Cached Save"))
         {
             Employee2.Save();
         }
     }
     for (int x = 0; x < 100; ++x)
     {
         using (Utilities.Profiler.Profiler Profiler = new Utilities.Profiler.Profiler("Multiple Source Cached All"))
         {
             Employee2.All();
         }
     }
     for (int x = 0; x < 100; ++x)
     {
         using (Utilities.Profiler.Profiler Profiler = new Utilities.Profiler.Profiler("Multiple Source Cached Any"))
         {
             Employee2.Any();
         }
     }
     for (int x = 0; x < 100; ++x)
     {
         using (Utilities.Profiler.Profiler Profiler = new Utilities.Profiler.Profiler("Multiple Source Cached Paged"))
         {
             Employee2.Paged();
         }
     }
 }
 private static void MultipleSourceCached(System.Random Rand)
 {
     foreach (Employee2 Employee2 in 100.Times(x => Rand.NextClass<Employee2>()))
     {
         using (Utilities.Profiler.Profiler Profiler = new Utilities.Profiler.Profiler("Multiple Source Cached Save"))
         {
             Employee2.Save();
         }
     }
     for (int x = 0; x < 100; ++x)
     {
         using (Utilities.Profiler.Profiler Profiler = new Utilities.Profiler.Profiler("Multiple Source Cached All"))
         {
             Employee2.All();
         }
     }
     for (int x = 0; x < 100; ++x)
     {
         using (Utilities.Profiler.Profiler Profiler = new Utilities.Profiler.Profiler("Multiple Source Cached Any"))
         {
             Employee2.Any();
         }
     }
     for (int x = 0; x < 100; ++x)
     {
         using (Utilities.Profiler.Profiler Profiler = new Utilities.Profiler.Profiler("Multiple Source Cached Paged"))
         {
             Employee2.Paged();
         }
     }
 }
 public void BasicTest()
 {
     Utilities.Profiler.Profiler TestObject = new Utilities.Profiler.Profiler("Func1");
     Thread.Sleep(600);
     Utilities.Profiler.Profiler A = new Utilities.Profiler.Profiler("A");
     Thread.Sleep(600);
     A.Stop();
     TestObject.Stop();
     Assert.InRange(A.Times.Sum(), 500, 700);
     Assert.InRange(TestObject.Times.Sum(), 1100, 1300);
 }
Пример #5
0
 public void BasicTest()
 {
     Utilities.Profiler.Profiler TestObject = new Utilities.Profiler.Profiler("Func1");
     Thread.Sleep(600);
     Utilities.Profiler.Profiler A = new Utilities.Profiler.Profiler("A");
     Thread.Sleep(600);
     A.Stop();
     TestObject.Stop();
     Assert.InRange(A.Times.Sum(), 500, 700);
     Assert.InRange(TestObject.Times.Sum(), 1100, 1300);
 }
 private static void MultipleSourceCachedCascade(System.Random Rand)
 {
     foreach (Employee3 Employee3 in 100.Times(x => Rand.NextClass<Employee3>()))
     {
         Employee3.Boss = Rand.NextClass<Employee3>();
         using (Utilities.Profiler.Profiler Profiler = new Utilities.Profiler.Profiler("Multiple Source Cached Cascade Save"))
         {
             Employee3.Save();
         }
     }
     for (int x = 0; x < 100; ++x)
     {
         using (Utilities.Profiler.Profiler Profiler = new Utilities.Profiler.Profiler("Multiple Source Cached Cascade All"))
         {
             Employee3.All().ForEach(y => { var Temp = y.Boss; });
         }
     }
     for (int x = 0; x < 100; ++x)
     {
         using (Utilities.Profiler.Profiler Profiler = new Utilities.Profiler.Profiler("Multiple Source Cached Cascade Any"))
         {
             var Temp = Employee3.Any().Boss;
         }
     }
     for (int x = 0; x < 100; ++x)
     {
         using (Utilities.Profiler.Profiler Profiler = new Utilities.Profiler.Profiler("Multiple Source Cached Cascade Paged"))
         {
             Employee3.Paged().ForEach(y => { var Temp = y.Boss; });
         }
     }
 }