private void BackgroundWorker_DoWork(object sender, DoWorkEventArgs e) { Thread.Sleep(5000); benchmark.InitializeBenchmark(); Data.GenerateMarketStats(); double score = benchmark.RunLoadFilesTest(5); var rateDataParse = (int)(100 * 6500.0 / score); score = benchmark.RunStrategyTest(30); var rateStrategy = (int)(100 * 29100.0 / score); e.Result = (100 * rateStrategy + 2 * rateDataParse) / 102; }