Changeset 12834 for branches/PerformanceComparison/HeuristicLab.Analysis
- Timestamp:
- 08/03/15 23:33:19 (9 years ago)
- Location:
- branches/PerformanceComparison/HeuristicLab.Analysis/3.3/QualityAnalysis
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/PerformanceComparison/HeuristicLab.Analysis/3.3/QualityAnalysis/QualityPerClockAnalyzer.cs
r12808 r12834 79 79 var values = dataTable.Rows["First-hit Graph"].Values; 80 80 81 if (values.Count == 0 || values.Last().Item2 != bestQuality) { 82 var lastUpdateTime = LastUpdateTimeParameter.ActualValue; 83 if (lastUpdateTime == null) { 84 lastUpdateTime = new DateTimeValue(DateTime.UtcNow.AddMilliseconds(-1)); 85 LastUpdateTimeParameter.ActualValue = lastUpdateTime; 86 } 81 var lastUpdateTime = LastUpdateTimeParameter.ActualValue; 82 if (lastUpdateTime == null) { 83 lastUpdateTime = new DateTimeValue(DateTime.UtcNow.AddMilliseconds(-1)); 84 LastUpdateTimeParameter.ActualValue = lastUpdateTime; 85 } 87 86 88 var now = DateTime.UtcNow; 89 var runtimeSoFar = (now - lastUpdateTime.Value).TotalSeconds + (values.Count > 0 ? values.Last().Item1 : 0); 90 dataTable.Rows["First-hit Graph"].Values.Add(Tuple.Create(runtimeSoFar, bestQuality)); 91 lastUpdateTime.Value = now; 87 var now = DateTime.UtcNow; 88 var runtimeSoFar = (now - lastUpdateTime.Value).TotalSeconds + (values.Count > 0 ? values.Last().Item1 : 0); 89 lastUpdateTime.Value = now; 90 var newEntry = Tuple.Create(runtimeSoFar, bestQuality); 91 92 if (values.Count == 0) { 93 values.Add(newEntry); 94 values.Add(Tuple.Create(runtimeSoFar, bestQuality)); // duplicate entry that will be replaced 95 return base.Apply(); 96 } 97 98 var improvement = values.Last().Item2 != bestQuality; 99 if (improvement) { 100 values[values.Count - 1] = newEntry; 101 values.Add(Tuple.Create(runtimeSoFar, bestQuality)); // duplicate entry that will be replaced 102 } else { 103 values[values.Count - 1] = Tuple.Create(runtimeSoFar, bestQuality); 92 104 } 93 105 return base.Apply(); -
branches/PerformanceComparison/HeuristicLab.Analysis/3.3/QualityAnalysis/QualityPerEvaluationsAnalyzer.cs
r12808 r12834 91 91 var values = dataTable.Rows["First-hit Graph"].Values; 92 92 if (evaluations == 0 || values.Count > 0 && evaluations < values.Last().Item1) evaluations = 1; 93 if (values.Count == 0 || values.Last().Item2 != bestQuality) 94 values.Add(Tuple.Create((double)evaluations, bestQuality)); 93 var newEntry = Tuple.Create(evaluations, bestQuality); 95 94 95 if (values.Count == 0) { 96 values.Add(newEntry); 97 values.Add(Tuple.Create(evaluations, bestQuality)); // duplicate entry that will be replaced 98 return base.Apply(); 99 } 100 101 var improvement = values.Last().Item2 != bestQuality; 102 if (improvement) { 103 values[values.Count - 1] = newEntry; 104 values.Add(Tuple.Create(evaluations, bestQuality)); // duplicate entry that will be replaced 105 } else { 106 values[values.Count - 1] = Tuple.Create(evaluations, bestQuality); 107 } 96 108 return base.Apply(); 97 109 }
Note: See TracChangeset
for help on using the changeset viewer.