/** * no confirmations are created and applied */ private void StartTestCycle(SimulationInterval simulationInterval, bool shouldPersist) { Quantity customerOrderQuantity = new Quantity(ZppConfiguration.CacheManager .GetTestConfiguration().CustomerOrderPartQuantity); // init transactionData ZppConfiguration.CacheManager.ReloadTransactionData(); _customerOrderCreator = new CustomerOrderCreator(customerOrderQuantity); _customerOrderCreator.CreateCustomerOrders(simulationInterval, customerOrderQuantity); // execute mrp2 Zpp.Mrp2.impl.Mrp2 mrp2 = new Zpp.Mrp2.impl.Mrp2(simulationInterval); mrp2.StartMrp2(); DebuggingTools.PrintStateToFiles(simulationInterval, ZppConfiguration.CacheManager.GetDbTransactionData(), "", true); // no confirmations // persisting cached/created data if (shouldPersist) { ZppConfiguration.CacheManager.Persist(); } }
public void StartPerformanceStudy(bool shouldPersist) { ZppConfiguration.IsInPerformanceMode = true; int maxSimulatingTime = ZppConfiguration.CacheManager.GetTestConfiguration() .SimulationMaximumDuration; int defaultInterval = ZppConfiguration.CacheManager.GetTestConfiguration().SimulationInterval; Quantity customerOrderQuantity = new Quantity(ZppConfiguration.CacheManager .GetTestConfiguration().CustomerOrderPartQuantity); _customerOrderCreator = new CustomerOrderCreator(customerOrderQuantity); string performanceLogCycles = "["; _performanceMonitors.Start(InstanceToTrack.Global); for (int i = 0; i *defaultInterval <= maxSimulatingTime; i++) { SimulationInterval simulationInterval = new SimulationInterval(i * defaultInterval, defaultInterval - 1); StartOneCycle(simulationInterval, customerOrderQuantity); if (ZppConfiguration.CacheManager.GetDbTransactionDataArchive() .CustomerOrderPartGetAll().Count() > customerOrderQuantity.GetValue()) { break; } performanceLogCycles += _performanceMonitors.ToString() + ","; } _performanceMonitors.Stop(InstanceToTrack.Global); performanceLogCycles += $"{_performanceMonitors.ToString()}]"; // DebuggingTools.PrintStateToFiles(dbTransactionData, true); DebuggingTools.WritePerformanceLog(performanceLogCycles); // persisting cached/created data if (shouldPersist) { ZppConfiguration.CacheManager.Persist(); } }
public void StartPerformanceStudy(bool shouldPersist) { ZppConfiguration.IsInPerformanceMode = true; int maxSimulatingTime = ZppConfiguration.CacheManager.GetTestConfiguration() .SimulationMaximumDuration; int defaultInterval = ZppConfiguration.CacheManager.GetTestConfiguration().SimulationInterval; Quantity customerOrderQuantity = new Quantity(ZppConfiguration.CacheManager .GetTestConfiguration().CustomerOrderPartQuantity); _customerOrderCreator = new CustomerOrderCreator(customerOrderQuantity); string performanceLogCycles = "["; for (int i = 0; i *defaultInterval <= maxSimulatingTime; i++) { SimulationInterval simulationInterval = new SimulationInterval(i * defaultInterval, defaultInterval - 1); StartOneCycle(simulationInterval, customerOrderQuantity); if (ZppConfiguration.CacheManager.GetDbTransactionDataArchive() .CustomerOrderPartGetAll().Count() > customerOrderQuantity.GetValue()) { break; } } // TODO: here is no performance measure anymore, remove whole surounding method ? // DebuggingTools.PrintStateToFiles(dbTransactionData, true); DebuggingTools.WritePerformanceLog(performanceLogCycles); // persisting cached/created data if (shouldPersist) { ZppConfiguration.CacheManager.Persist(); } }