SlidingWindowStatistics

@Serializable
data class SlidingWindowStatistics(val currentRequests: Int, val totalRequests: Long, val acceptedRequests: Long, val rejectedRequests: Long)(source)

Statistics for a sliding window rate limiter.

Constructors

Link copied to clipboard
constructor(currentRequests: Int, totalRequests: Long, acceptedRequests: Long, rejectedRequests: Long)

Properties

Link copied to clipboard

Acceptance rate as a ratio from 0.0 to 1.0.

Link copied to clipboard

Total number of accepted requests

Link copied to clipboard

Current number of requests in the window

Link copied to clipboard

Total number of rejected requests

Link copied to clipboard

Rejection rate as a ratio from 0.0 to 1.0.

Link copied to clipboard

Total number of requests attempted