示例#1
0
 public DurationMeasurement(PerformanceMetrics parent)
 {
     _parent          = parent;
     _counter         = 0;
     _commandsCounter = 0;
     _start           = DateTime.UtcNow;
 }
示例#2
0
 public DatabasePerformanceMetrics(MetricType type, int currentBufferSize, int summaryBufferSize)
 {
     switch (type)
     {
         case MetricType.GeneralWait:
             _buffer = new GeneralWaitPerformanceMetrics(currentBufferSize, summaryBufferSize);
             break;
         case MetricType.Transaction:
             _buffer = new TransactionPerformanceMetrics(currentBufferSize, summaryBufferSize);
             break;
         default:
             throw new ArgumentException("Invalid metric type passed to DatabasePerfomanceMetrics " + type);
     }
 }