Changeset 14927 for branches/PersistenceReintegration/HeuristicLab.Algorithms.Benchmarks/3.3/BenchmarkAlgorithm.cs
- Timestamp:
- 05/04/17 17:19:35 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/PersistenceReintegration/HeuristicLab.Algorithms.Benchmarks/3.3/BenchmarkAlgorithm.cs
r14185 r14927 32 32 using HeuristicLab.Optimization; 33 33 using HeuristicLab.Parameters; 34 using HeuristicLab.Persistence .Default.CompositeSerializers.Storable;34 using HeuristicLab.Persistence; 35 35 using HeuristicLab.PluginInfrastructure; 36 36 … … 38 38 [Item("Benchmark Algorithm", "An algorithm to execute performance benchmarks (Linpack, Dhrystone, Whetstone, etc.).")] 39 39 [Creatable(CreatableAttribute.Categories.TestingAndAnalysis, Priority = 130)] 40 [Storable Class]40 [StorableType("ba854a73-3342-471c-a7f9-314435879f90")] 41 41 public sealed class BenchmarkAlgorithm : IAlgorithm { 42 42 private CancellationTokenSource cancellationTokenSource; … … 308 308 try { 309 309 t.Wait(); 310 } 311 catch (AggregateException ex) { 310 } catch (AggregateException ex) { 312 311 try { 313 312 ex.Flatten().Handle(x => x is OperationCanceledException); 314 } 315 catch (AggregateException remaining) { 313 } catch (AggregateException remaining) { 316 314 if (remaining.InnerExceptions.Count == 1) OnExceptionOccurred(remaining.InnerExceptions[0]); 317 315 else OnExceptionOccurred(remaining); … … 346 344 Benchmark.TimeLimit = timelimit; 347 345 Benchmark.Run(cancellationToken, results); 348 } 349 catch (OperationCanceledException) { 350 } 351 finally { 346 } catch (OperationCanceledException) { 347 } finally { 352 348 timer.Elapsed -= new System.Timers.ElapsedEventHandler(timer_Elapsed); 353 349 timer.Stop();
Note: See TracChangeset
for help on using the changeset viewer.