JustEat.StatsD.StatsDMessageFormatter.Decrement C# (CSharp) Method

Decrement() public method

public Decrement ( long magnitude, double sampleRate ) : string
magnitude long
sampleRate double
return string
        public string Decrement(long magnitude, double sampleRate, params string[] statBuckets)
        {
            magnitude = magnitude < 0 ? magnitude : -magnitude;
            return Increment(magnitude, sampleRate, statBuckets);
        }

Same methods

StatsDMessageFormatter::Decrement ( ) : string
StatsDMessageFormatter::Decrement ( long magnitude ) : string
StatsDMessageFormatter::Decrement ( long magnitude, double sampleRate, string statBucket ) : string
StatsDMessageFormatter::Decrement ( long magnitude, string statBucket ) : string
StatsDMessageFormatter::Decrement ( string statBucket ) : string

Usage Example

Beispiel #1
0
        public void DecrementingCounterWithValueIsCorrect()
        {
            // Arrange
            var target = new StatsDMessageFormatter();

            // Act
            string actual = target.Decrement(_value, _statBucket);

            // Assert
            actual.ShouldBe(string.Format(CultureInfo.InvariantCulture, "{0}:-{1}|c", _statBucket, _value));
        }
All Usage Examples Of JustEat.StatsD.StatsDMessageFormatter::Decrement