Changeset 12857 for branches/HiveStatistics/sources/HeuristicLab.Services.Hive/3.3/PerformanceLogger.cs
- Timestamp:
- 08/13/15 14:51:54 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HiveStatistics/sources/HeuristicLab.Services.Hive/3.3/PerformanceLogger.cs
r12691 r12857 32 32 public PerformanceLogger(string name) { 33 33 this.name = name; 34 stopwatch = new Stopwatch(); 35 stopwatch.Start(); 34 if (Properties.Settings.Default.ProfileServicePerformance) { 35 stopwatch = new Stopwatch(); 36 stopwatch.Start(); 37 } 36 38 } 37 39 public void Dispose() { 38 stopwatch.Stop(); 39 LogFactory.GetLogger(this.GetType().Namespace).Log(string.Format("{0} took {1}ms", name, stopwatch.ElapsedMilliseconds)); 40 if (Properties.Settings.Default.ProfileServicePerformance) { 41 stopwatch.Stop(); 42 LogFactory.GetLogger(this.GetType().Namespace) 43 .Log(string.Format("{0} took {1}ms", name, stopwatch.ElapsedMilliseconds)); 44 } 40 45 } 41 46 }
Note: See TracChangeset
for help on using the changeset viewer.