public void PersistLoggingMaxPerformance() { if (IsOdbc) { return; //TODO temporary skipped } var ea = new EntityA(); TestBase.TestSerialization(ea); var eb = new EntityB(); TestBase.TestSerialization(eb); var rng = new Random(); for (var j = 0; j < 5; ++j) { using (var em = Emf.CreateEntityManager()) { var mutatorSpec = new MutatorSpec(MutatorKind.Chunked) { Queued = true, //// MaxCellCount = 8 * 1024, MaxChunkSize = 64 * 1024, FlushEachChunk = true, Capacity = 32768 }; using (var ma = em.GetTable <EntityA>().CreateMutator(mutatorSpec)) using (var mb = em.GetTable <EntityB>().CreateMutator(mutatorSpec)) { for (var i = 0; i < 100000; ++i) { ea = new EntityA(); rng.NextBytes(ea.Value); ma.Set(new Key { ColumnFamily = "a" }, Serializer.ToByteArray(ea), true); eb = new EntityB(); rng.NextBytes(eb.Value); mb.Set(new Key { ColumnFamily = "b" }, Serializer.ToByteArray(ea), true); } } } } }
public void PersistLoggingMaxPerformance() { if (IsOdbc) { return; //TODO temporary skipped } var ea = new EntityA(); TestBase.TestSerialization(ea); var eb = new EntityB(); TestBase.TestSerialization(eb); var rng = new Random(); for (var j = 0; j < 5; ++j) { using (var em = Emf.CreateEntityManager()) { var mutatorSpec = new MutatorSpec(MutatorKind.Chunked) { Queued = true, //// MaxCellCount = 8 * 1024, MaxChunkSize = 64 * 1024, FlushEachChunk = true, Capacity = 32768 }; using (var ma = em.GetTable<EntityA>().CreateMutator(mutatorSpec)) using (var mb = em.GetTable<EntityB>().CreateMutator(mutatorSpec)) { for (var i = 0; i < 100000; ++i) { ea = new EntityA(); rng.NextBytes(ea.Value); ma.Set(new Key { ColumnFamily = "a" }, Serializer.ToByteArray(ea), true); eb = new EntityB(); rng.NextBytes(eb.Value); mb.Set(new Key { ColumnFamily = "b" }, Serializer.ToByteArray(ea), true); } } } } }
public void PersistLogging() { if (IsOdbc) { return; //TODO temporary skipped } var ea = new EntityA(); TestBase.TestSerialization(ea); var eb = new EntityB(); TestBase.TestSerialization(eb); for (var j = 0; j < 5; ++j) { using (var em = Emf.CreateEntityManager()) { em.Configuration.MutatorSpec = new MutatorSpec(MutatorKind.Chunked) { Queued = true, //// MaxCellCount = 8 * 1024, MaxChunkSize = 64 * 1024, FlushEachChunk = true, Capacity = 32768 }; for (var i = 0; i < 100000; ++i) { ea = new EntityA(); Rng.Instance.NextBytes(ea.Value); em.Persist(ea, Behaviors.CreateNew | Behaviors.DoNotCache); eb = new EntityB(); Rng.Instance.NextBytes(eb.Value); em.Persist(eb, Behaviors.CreateNew | Behaviors.DoNotCache); } } } }
public void PersistLogging() { if (IsOdbc) { return; //TODO temporary skipped } var ea = new EntityA(); TestBase.TestSerialization(ea); var eb = new EntityB(); TestBase.TestSerialization(eb); for (var j = 0; j < 5; ++j) { using (var em = Emf.CreateEntityManager()) { em.Configuration.MutatorSpec = new MutatorSpec(MutatorKind.Chunked) { Queued = true, //// MaxCellCount = 8 * 1024, MaxChunkSize = 64 * 1024, FlushEachChunk = true, Capacity = 32768 }; for (var i = 0; i < 100000; ++i) { ea = new EntityA(); Rng.Instance.NextBytes(ea.Value); em.Persist(ea, Behaviors.CreateNew | Behaviors.DoNotCache); eb = new EntityB(); Rng.Instance.NextBytes(eb.Value); em.Persist(eb, Behaviors.CreateNew | Behaviors.DoNotCache); } } } }