Beispiel #1
0
        protected void BenchmarkThreadRoutineFinish()
        {
            BenchmarkProcessStatus status = BenchmarkProcessStatus.Finished;

            if (BenchmarkAlgorithm.BenchmarkSpeed > 0)
            {
                status = BenchmarkProcessStatus.Success;
            }

            using (StreamWriter sw = File.AppendText(benchmarkLogPath)) {
                foreach (var line in bench_lines)
                {
                    sw.WriteLine(line);
                }
            }
            BenchmarkProcessStatus = status;
            Helpers.ConsolePrint("BENCHMARK", "Final Speed: " + Helpers.FormatDualSpeedOutput(BenchmarkAlgorithm.BenchmarkSpeed, BenchmarkAlgorithm.SecondaryBenchmarkSpeed));
            Helpers.ConsolePrint("BENCHMARK", "Benchmark ends");
            if (BenchmarkComunicator != null && !OnBenchmarkCompleteCalled)
            {
                OnBenchmarkCompleteCalled = true;
                bool   isOK = BenchmarkProcessStatus.Success == status;
                string msg  = GetFinalBenchmarkString();
                BenchmarkComunicator.OnBenchmarkComplete(isOK, isOK ? "" : msg);
            }
        }
Beispiel #2
0
 protected void BenchmarkThreadRoutineFinish(BenchmarkProcessStatus status)
 {
     using (StreamWriter sw = File.AppendText(benchmarkLogPath)) {
         foreach (var line in bench_lines)
         {
             sw.WriteLine(line);
         }
     }
     BenchmarkProcessStatus = status;
     Helpers.ConsolePrint("BENCHMARK", "Final Speed: " + Helpers.FormatSpeedOutput(BenchmarkAlgorithm.BenchmarkSpeed));
     Helpers.ConsolePrint("BENCHMARK", "Benchmark ends");
     if (BenchmarkComunicator != null && !OnBenchmarkCompleteCalled)
     {
         OnBenchmarkCompleteCalled = true;
         BenchmarkComunicator.OnBenchmarkComplete(true, "Success");
     }
 }