Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
08/13/15 14:51:54 (9 years ago)
Author:
ascheibe
Message:

#2388

  • cleaned up sql scripts
  • cleaned up hive service
  • made performance logger optional
  • removed unused web service methods
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HiveStatistics/sources/HeuristicLab.Services.Hive/3.3/PerformanceLogger.cs

    r12691 r12857  
    3232    public PerformanceLogger(string name) {
    3333      this.name = name;
    34       stopwatch = new Stopwatch();
    35       stopwatch.Start();
     34      if (Properties.Settings.Default.ProfileServicePerformance) {
     35        stopwatch = new Stopwatch();
     36        stopwatch.Start();
     37      }
    3638    }
    3739    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      }
    4045    }
    4146  }
Note: See TracChangeset for help on using the changeset viewer.