示例#1
0
        private static void ReportTransactions()
        {
            var results       = new List <TesteResults>();
            var efTest        = new EntityFramework();
            var adoTest       = new AdoNet();
            var adoReaderTest = new AdoNetAutoMapper();
            var dapperTest    = new Frameworks.Dapper();

            for (var i = 1; i <= NumberOfExecutions; i++)
            {
                results.Add(new TesteResults
                {
                    Framework = EnumFrameworks.Entity,
                    RunNumber = i,
                    Time      = efTest.ReportTransactionsAnalyzed(i)
                });


                results.Add(new TesteResults
                {
                    Framework = EnumFrameworks.AdoNet,
                    RunNumber = i,
                    Time      = adoTest.ReportTransactionsAnalyzed(i)
                });

                results.Add(new TesteResults
                {
                    Framework = EnumFrameworks.Dapper,
                    RunNumber = i,
                    Time      = dapperTest.ReportTransactionsAnalyzed(i)
                });
            }
            ProcessResults(results);
        }
示例#2
0
        private static void GetTransaction()
        {
            var results       = new List <TesteResults>();
            var efTest        = new EntityFramework();
            var adoTest       = new AdoNet();
            var adoReaderTest = new AdoNetAutoMapper();
            var dapperTest    = new Frameworks.Dapper();

            for (var i = 1; i <= NumberOfExecutions; i++)
            {
                results.Add(new TesteResults
                {
                    Framework = EnumFrameworks.Entity,
                    RunNumber = i,
                    Time      = efTest.GetTransactions(Faker.RandomNumber.Next(1, 102000))
                });


                results.Add(new TesteResults
                {
                    Framework = EnumFrameworks.AdoNet,
                    RunNumber = i,
                    Time      = adoTest.GetTransactions(Faker.RandomNumber.Next(1, 102000))
                });


                //results.Add(new TesteResults
                //{
                //    Framework = EnumFrameworks.AdoNetAutoMapper,
                //    RunNumber = i,
                //    Time = adoReaderTest.GetTransactions(i)
                //});


                results.Add(new TesteResults
                {
                    Framework = EnumFrameworks.Dapper,
                    RunNumber = i,
                    Time      = dapperTest.GetTransactions(Faker.RandomNumber.Next(1, 102000))
                });
            }
            ProcessResults(results);
        }