SlidingWindowCounter is used to count the number of events happened in the last X duration (in terms of a sliding window). Interval defines how big the time window is and SlotGranularity defines how fine grained the counter is.
NewSlidingWindowCounter creates an instance of SlidingWindowCounter
NewSlidingWindowCounterWithSecondSlot creates an instance of SlidingWindowCounter with the second level slot
Count reads the current gauge. It's a blocking operation.
Increment increase the counter by 1. It's a blocking operation.