static void Main(string[] args)
        {
            Action a1 = new Action(Program.BenchLogReflectionStudent);

            NBench.Bench(a1);
            NBench.Bench(Program.BenchLogDynamicStudent);
        }
예제 #2
0
        static void Main(string[] args)
        {
            // NBench.Bench(Program.BenchLogReflectStudent); // JAVA Program::BenchLogReflectStudent
            // NBench.Bench(Program.BenchLogDynamicStudent);

            // Demo();

            NBench.Bench(Program.BenchLogReflectPoint);
            NBench.Bench(Program.BenchLogDynamicPoint);
        }
예제 #3
0
        public static void Main(string[] args)
        {
            Console.WriteLine("IMPORTANT: No caching shall be used for these tests to ensure that the results given " +
                              "by NBench are a result of the different DataMappers!");

            Console.WriteLine("\nPress ENTER to Start Customer Test");
            Console.ReadLine();

            Console.WriteLine("############## Customer");

            NBench.Bench(() => CustomerDynamic(), "Dynamic Test");
            NBench.Bench(() => CustomerReflect(), "Reflect Test");
            NBench.Bench(() => CustomerEmit(), "Emit Test");

            Console.WriteLine("\nPress ENTER to Start Employee Test");
            Console.ReadLine();

            Console.WriteLine("############## Employee");

            NBench.Bench(() => EmployeeDynamic(), "Dynamic Test");
            NBench.Bench(() => EmployeeReflect(), "Reflect Test");
            NBench.Bench(() => EmployeeEmit(), "Emit Test");

            Console.WriteLine("\nPress ENTER to Start Product Test");
            Console.ReadLine();

            Console.WriteLine("############## Product");

            NBench.Bench(() => ProductDynamic(), "Dynamic Test");
            NBench.Bench(() => ProductReflect(), "Reflect Test");
            NBench.Bench(() => ProductEmit(), "Emit Test");

            Console.WriteLine("\nAs can be seen the best performance is either given by the Standard Dynamic DataMapper or by Emited DataMapper.\n" +
                              "On the other hand Reflection DataMapper tends to have less performance compared to the other two, " +
                              "this is due to the reflection interface being quite more intensive.");
            Console.WriteLine("\nPress ENTER to Exit...");
            Console.ReadLine();
        }