static void Main(string[] args) { BenchmarkManager manager = BenchmarkManager.Current; manager.Log += WriteLine; manager.Register(typeof(BenchmarksBasic).Assembly); manager.Start(); ReadLine(); }
private bool StartButonClick() { CalcBenchmarkDevicesAlgorithmQueue(); // device selection check scope { var noneSelected = AvailableDevices.Devices.All(cDev => !cDev.Enabled); if (noneSelected) { MessageBox.Show(Translations.Tr("No device has been selected there is nothing to benchmark"), Translations.Tr("No device selected"), MessageBoxButtons.OK); return(false); } } // device todo benchmark check scope { if (!BenchmarkManager.HasWork) { MessageBox.Show(Translations.Tr("Current benchmark settings are already executed. There is nothing to do."), Translations.Tr("Nothing to benchmark"), MessageBoxButtons.OK); return(false); } } // disable gui controls benchmarkOptions1.Enabled = false; CloseBtn.Enabled = false; algorithmsListView1.IsInBenchmark = true; devicesListViewEnableControl1.IsInBenchmark = true; algorithmSettingsControl1.IsInBenchmark = true; algorithmSettingsControl1.Enabled = false; // set benchmark pending status foreach (var deviceAlgosTuple in BenchmarkManager.BenchDevAlgoQueue) { foreach (var algo in deviceAlgosTuple.Item2) { algo.SetBenchmarkPending(); } if (deviceAlgosTuple.Item1 != null) { algorithmsListView1.RepaintStatus(deviceAlgosTuple.Item1.Enabled, deviceAlgosTuple.Item1.Uuid); } } BenchmarkManager.Start(benchmarkOptions1.PerformanceType, this); _benchmarkingTimer.Start(); return(true); }
private void ButtonRunOnClick(object sender, EventArgs eventArgs) { _benchmarkManager.Start(); }