Stats

public class Stats

Circuit Breaker statistics.

  • Number of timeouts.

    Declaration

    Swift

    internal(set) public var timeouts: Int = 0
  • Number of successful responses.

    Declaration

    Swift

    internal(set) public var successfulResponses: Int = 0
  • Number of failed responses.

    Declaration

    Swift

    internal(set) public var failedResponses: Int = 0
  • Total number of requests.

    Declaration

    Swift

    internal(set) public var totalRequests: Int = 0
  • Number of rejected requests.

    Declaration

    Swift

    internal(set) public var rejectedRequests: Int = 0
  • Array of request latencies.

    Declaration

    Swift

    internal(set) public var executionLatencies: [Int] = []
  • Array of request latencies.

    Declaration

    Swift

    internal(set) public var totalLatencies: [Int] = []
  • Default latency percentiles.

    Declaration

    Swift

    public var percentiles = [0.0, 0.25, 0.5, 0.75, 0.9, 0.95, 0.99, 0.995, 1.0]
  • Returns the cumulative latency.

    Declaration

    Swift

    public var totalLatency: Int
  • Returns the cumulative latency.

    Declaration

    Swift

    public var totalExecutionLatency: Int
  • Returns the average execution response time.

    Declaration

    Swift

    public var meanExecutionLatency: Int
  • Returns the average total response time.

    Declaration

    Swift

    public var meanTotalLatency: Int
  • Returns the number of concurrent requests.

    Declaration

    Swift

    public var concurrentRequests: Int
  • Percentage of responses that threw an error.

    Declaration

    Swift

    public var errorPercentage: Double
  • Number of errored responses.

    Declaration

    Swift

    public var errorCount: Int
  • Latency Executes Mapping Percentile -> Execution time (in milliseconds).

    Declaration

    Swift

    public var latencyExecute: [Double: Int]
  • Latency Total Mapping Percentile -> Total end-to-end execution time (in milliseconds).

    Declaration

    Swift

    public var latencyTotal: [Double: Int]
  • Number of failed executions (this includes both rejected and failed responses).

    Declaration

    Swift

    public var failed: Int
  • Number of successful executions.

    Declaration

    Swift

    public var successful: Int
  • Logs a snapshot of the current CircuitBreaker statistics.

    Declaration

    Swift

    public func snapshot ()