public Guid Execute(out ErrorResultTO errors, int update)
        {
            var start = _stopwatch.ElapsedTicks;
            var errorsInstanceCounter     = _locater.GetCounter(GetDataObject().ResourceID, WarewolfPerfCounterType.ExecutionErrors);
            var concurrentInstanceCounter = _locater.GetCounter(GetDataObject().ResourceID, WarewolfPerfCounterType.ConcurrentRequests);
            var avgExecutionsInstance     = _locater.GetCounter(GetDataObject().ResourceID, WarewolfPerfCounterType.AverageExecutionTime);
            var reqPerSecond = _locater.GetCounter(GetDataObject().ResourceID, WarewolfPerfCounterType.RequestsPerSecond);
            var outErrors    = new ErrorResultTO();

            try
            {
                _recPerSecondCounter.Increment();
                _currentConnections.Increment();
                reqPerSecond.Increment();
                concurrentInstanceCounter.Increment();
                var ret = Container.Execute(out outErrors, update);
                errors = outErrors;
                return(ret);
            }
            finally
            {
                _currentConnections.Decrement();
                concurrentInstanceCounter.Decrement();
                var time = _stopwatch.ElapsedTicks - start;
                _avgTime.IncrementBy(time);
                avgExecutionsInstance.IncrementBy(time);
                if (outErrors != null)
                {
                    _totalErrors.IncrementBy(outErrors.FetchErrors().Count);
                    errorsInstanceCounter.IncrementBy(outErrors.FetchErrors().Count);
                }
            }
        }
Exemplo n.º 2
0
 public void Decrement()
 {
     try
     {
         _innerCounter.Decrement();
     }
     catch
     {
         ChangeCounter(_nullPerformanceCounter);
     }
 }
Exemplo n.º 3
0
 public void Decrement()
 {
     try
     {
         _counter.Setup();
         _counter.Decrement();
     }
     catch (Exception e)
     {
         Dev2Logger.Error(e, GlobalConstants.WarewolfError);
     }
 }
Exemplo n.º 4
0
 public void Decrement()
 {
     try
     {
         _counter.Setup();
         _counter.Decrement();
     }
     catch (Exception e)
     {
         Dev2Logger.Error(e);
     }
 }
Exemplo n.º 5
0
 private void OnInstanceReleased(Burden burden)
 {
     using (@lock.ForWriting())
     {
         if (instance2Burden.Remove(burden.Instance) == false)
         {
             return;
         }
         burden.Released -= OnInstanceReleased;
     }
     countOfTrackedInstances.Decrement();
 }