private SamplingResponse ProcessMatchedRule(SamplingRule sampleRule, TimeStamp time)
        {
            bool             shouldSample = true;
            Reservoir        reservoir    = sampleRule.Reservoir;
            SamplingResponse sampleResult = null;

            sampleRule.IncrementRequestCount();                                                       // increment request counter for matched rule
            ReservoirDecision reservoirDecision = reservoir.BorrowOrTake(time, sampleRule.CanBorrow); // check if we can borrow or take from reservoir

            if (reservoirDecision == ReservoirDecision.Borrow)
            {
                sampleRule.IncrementBorrowCount();
            }
            else if (reservoirDecision == ReservoirDecision.Take)
            {
                sampleRule.IncrementSampledCount();
            }
            else if (ThreadSafeRandom.NextDouble() <= sampleRule.GetRate()) // compute based on fixed rate
            {
                sampleRule.IncrementSampledCount();
            }
            else
            {
                shouldSample = false;
            }

            if (shouldSample)
            {
                sampleResult = new SamplingResponse(sampleRule.RuleName, SampleDecision.Sampled);
            }
            else
            {
                sampleResult = new SamplingResponse(SampleDecision.NotSampled);
            }

            return(sampleResult);
        }