Skip to main content
Version: Next

ClientStatistics

Statistics about API client usage and rate limit errors.

Index

Methods

add_rate_limit_error

  • add_rate_limit_error(attempt): None
  • Add rate limit error for specific attempt.


    Parameters

    • attempt: int

      The attempt number (1-based indexing).

    Returns None

Properties

calls

calls: int

Total number of calls made by the client, including requests to Actor servers.

rate_limit_errors

rate_limit_errors: defaultdict[int, int]

Number of rate limit (429) errors per attempt, keyed by the 0-based attempt index.

Reading a missing key adds it with a count of 0. Use .get() to read a count without changing the dict.

requests

requests: int

Total number of HTTP requests sent, including retries.