protected override void TearDown() { var simplests = new SimplestsCollection(); simplests.LoadAll(); simplests.MarkAllAsDeleted(); simplests.Save(); }
protected override void DeleteMultipleTest() { var simplests = new SimplestsCollection(); simplests.LoadAll(); simplests.MarkAllAsDeleted(); simplests.Save(); }
protected override void UpdateMultipleTest() { var simplests = new SimplestsCollection(); simplests.LoadAll(); foreach (var o in simplests) o.Value++; simplests.Save(); }
protected override void TearDown() { var simplests = new SimplestsCollection(); simplests.LoadAll(); simplests.MarkAllAsDeleted(); simplests.Save(); }
protected override void InsertMultipleTest(int count) { var simplests = new SimplestsCollection(); for (int i = 0; i < count; i++) { var simplest = simplests.AddNew(); simplest.Id = i; simplest.Value = i; } simplests.Save(); InstanceCount = count; }
protected override void UpdateMultipleTest() { var simplests = new SimplestsCollection(); simplests.LoadAll(); foreach (var o in simplests) { o.Value++; } simplests.Save(); }
protected override void InsertMultipleTest(int count) { var simplests = new SimplestsCollection(); for (int i = 0; i < count; i++) { var simplest = simplests.AddNew(); simplest.Id = i; simplest.Value = i; } simplests.Save(); InstanceCount = count; }
protected override void UpdateSingleTest() { using (var ts = new esTransactionScope()) { var simplests = new SimplestsCollection(); simplests.LoadAll(); foreach (var o in simplests) { o.Value++; o.Save(); } ts.Complete(); } }
protected override void DeleteSingleTest() { using (var ts = new esTransactionScope()) { var simplests = new SimplestsCollection(); simplests.LoadAll(); for (int i = simplests.Count - 1; i >= 0; i--) { var o = simplests[0]; o.MarkAsDeleted(); o.Save(); } ts.Complete(); } }
protected override void CompiledLinqQueryTest(int count) { using (var ts = new esTransactionScope()) { for (int i = 0; i < count; i++) { var id = i % InstanceCount; var query = new SimplestsCollection(); query.Load(_db, _compiledQuery(_db, id)); foreach (var simplest in query) { // Doing nothing, just enumerate } } ts.Complete(); } }
protected override void LinqQueryPageTest(int count, int pageSize) { using (var ts = new esTransactionScope()) { for (var i = 0; i < count; i++) { var id = (i * pageSize) % InstanceCount; var simplests = new SimplestsCollection(); simplests.Load(_db, _pageQuery(_db, id, pageSize)); foreach (var o in simplests) { // Doing nothing, just enumerate } } ts.Complete(); } }
protected override void NativeMaterializeTest(int count) { using (var ts = new esTransactionScope()) { var simplests = new SimplestsCollection(); int i = 0; while (i < count) { simplests.LoadAll(); foreach (var o in simplests) { if (++i >= count) { break; } } } ts.Complete(); } }
protected override void LinqMaterializeTest(int count) { using (var ts = new esTransactionScope()) { var simplests = new SimplestsCollection(); int i = 0; while (i < count) { simplests.Load(_db, _db.GetTable <Simplests>().Where(o => o.Id > 0)); foreach (var o in simplests) { if (++i >= count) { break; } } } ts.Complete(); } }
protected override void NativeQueryTest(int count) { using (var ts = new esTransactionScope()) { for (int i = 0; i < count; i++) { var simplests = new SimplestsCollection(); var id = i % InstanceCount; simplests.Query.Where(simplests.Query.Id == id); if (simplests.Query.Load()) { foreach (var simplest in simplests) { // Doing nothing, just enumerate } } } ts.Complete(); } }
protected override void Setup() { var conn = new esConnectionElement(); conn.ConnectionString = @"Data Source=.;Initial Catalog=PerformanceTest;Integrated Security=True;Pooling=True;MultipleActiveResultSets = true"; conn.Name = "PerformanceTest"; conn.Provider = "EntitySpaces.SqlClientProvider"; conn.ProviderClass = "DataProvider"; conn.SqlAccessType = esSqlAccessType.DynamicSQL; conn.ProviderMetadataKey = "esDefault"; conn.DatabaseVersion = "2005"; esConfigSettings.ConnectionInfo.Connections.Add(conn); esConfigSettings.ConnectionInfo.Default = "PerformanceTest"; esProviderFactory.Factory = new EntitySpaces.LoaderMT.esDataProviderFactory(); var simplests = new SimplestsCollection(); simplests.LoadAll(); simplests.MarkAllAsDeleted(); simplests.Save(); }
protected override void Setup() { var conn = new esConnectionElement(); conn.ConnectionString = @"Data Source=.;Initial Catalog=PerformanceTest;Integrated Security=True;Pooling=True;MultipleActiveResultSets = true"; conn.Name = "PerformanceTest"; conn.Provider = "EntitySpaces.SqlClientProvider"; conn.ProviderClass = "DataProvider"; conn.SqlAccessType = esSqlAccessType.DynamicSQL; conn.ProviderMetadataKey = "esDefault"; conn.DatabaseVersion = "2005"; esConfigSettings.ConnectionInfo.Connections.Add(conn); esConfigSettings.ConnectionInfo.Default = "PerformanceTest"; esProviderFactory.Factory = new EntitySpaces.LoaderMT.esDataProviderFactory(); var simplests = new SimplestsCollection(); simplests.LoadAll(); simplests.MarkAllAsDeleted(); simplests.Save(); }
protected override void DeleteMultipleTest() { var simplests = new SimplestsCollection(); simplests.LoadAll(); simplests.MarkAllAsDeleted(); simplests.Save(); }
protected override void NativeMaterializeTest(int count) { using (var ts = new esTransactionScope()) { var simplests = new SimplestsCollection(); int i = 0; while (i < count) { simplests.LoadAll(); foreach (var o in simplests) if (++i >= count) break; } ts.Complete(); } }
protected override void LinqQueryPageTest(int count, int pageSize) { using (var ts = new esTransactionScope()) { for (var i = 0; i < count; i++) { var id = (i * pageSize) % InstanceCount; var simplests = new SimplestsCollection(); simplests.Load(_db, _pageQuery(_db, id, pageSize)); foreach (var o in simplests) { // Doing nothing, just enumerate } } ts.Complete(); } }
protected override void LinqMaterializeTest(int count) { using (var ts = new esTransactionScope()) { var simplests = new SimplestsCollection(); int i = 0; while (i < count) { simplests.Load(_db, _db.GetTable<Simplests>().Where(o => o.Id > 0)); foreach (var o in simplests) if (++i >= count) break; } ts.Complete(); } }
protected override void NativeQueryTest(int count) { using (var ts = new esTransactionScope()) { for (int i = 0; i < count; i++) { var simplests = new SimplestsCollection(); var id = i % InstanceCount; simplests.Query.Where(simplests.Query.Id == id); if (simplests.Query.Load()) foreach (var simplest in simplests) { // Doing nothing, just enumerate } } ts.Complete(); } }
protected override void CompiledLinqQueryTest(int count) { using (var ts = new esTransactionScope()) { for (int i = 0; i < count; i++) { var id = i % InstanceCount; var query = new SimplestsCollection(); query.Load(_db, _compiledQuery(_db, id)); foreach (var simplest in query) { // Doing nothing, just enumerate } } ts.Complete(); } }
protected override void DeleteSingleTest() { using (var ts = new esTransactionScope()) { var simplests = new SimplestsCollection(); simplests.LoadAll(); for (int i = simplests.Count - 1; i >= 0; i--) { var o = simplests[0]; o.MarkAsDeleted(); o.Save(); } ts.Complete(); } }
protected override void UpdateSingleTest() { using (var ts = new esTransactionScope()) { var simplests = new SimplestsCollection(); simplests.LoadAll(); foreach (var o in simplests) { o.Value++; o.Save(); } ts.Complete(); } }