private void btnRedoAllTests_Click(object sender, EventArgs e) { if (_allTestsWorker.IsBusy) { _allTestsWorker.CancelAsync(); btnRedoAllTests.Text = "Run all tests"; return; } if (Archive.Results.Count() > 0) { runningProgressBar.Value = 0; runningProgressBar.Maximum = 100; btnRedoAllTests.Text = "Stop"; var runner = new BenchRunner(txtApacheBenchFileName.Text); _allTestsWorker.RunWorkerAsync(runner); } }
private void btnStart_Click(object sender, EventArgs e) { if (String.IsNullOrEmpty(txtAddress.Text)) return; BenchRunnerOptions option = CreateOptions(); var runner = new BenchRunner(txtApacheBenchFileName.Text); WorkerParams p = new WorkerParams(runner, option); _singleTestWorker.RunWorkerAsync(p); }
public WorkerParams(BenchRunner runner, BenchRunnerOptions options) { Runner = runner; Options = options; }