void statsEndRequest(long duration,boolean ok)
    {
        synchronized(_statsLock)
        {
            _requests++;
            _requestsActive--;
            if (_requestsActive<0)
                _requestsActive=0;
            if (_requestsActive < _requestsActiveMin)
                _requestsActiveMin=_requestsActive;
            
            if (ok)
            {
                _requestsDurationTotal+=duration;
                if (_requestsDurationMin==0 || duration<_requestsDurationMin)
                    _requestsDurationMin=duration;
                if (duration>_requestsDurationMax)
                    _requestsDurationMax=duration;
            }
            else
                _errors++;
        }
    }
void statsEndRequest ( long duration , boolean ok ) { synchronized ( _statsLock ) { _requests ++ ; _requestsActive -- ; if ( _requestsActive < 0 ) _requestsActive = 0 ; if ( _requestsActive < _requestsActiveMin ) _requestsActiveMin = _requestsActive ; if ( ok ) { _requestsDurationTotal += duration ; if ( _requestsDurationMin == 0 || duration < _requestsDurationMin ) _requestsDurationMin = duration ; if ( duration > _requestsDurationMax ) _requestsDurationMax = duration ; } else _errors ++ ; } }
/* ------------------------------------------------------------