Amazon.Runtime.Internal.Util.RequestMetrics.IncrementCounter C# (CSharp) Метод

IncrementCounter() приватный Метод

Increments a specific metric counter. If counter doesn't exist yet, it is set to 1.
private IncrementCounter ( Metric metric ) : void
metric Metric
Результат void
        internal void IncrementCounter(Metric metric)
        {
            if (!IsEnabled) return;

            lock (metricsLock)
            {
                long value;
                if (!Counters.TryGetValue(metric, out value))
                {
                    value = 1;
                }
                else
                {
                    value++;
                }
                Counters[metric] = value;
            }
        }