class Metrics:
    def __init__(self, client):
        self.client = client

    def get_realtime(self):
        return self.client.request("GET", "/metrics/realtime")

    def get_performance(self):
        return self.client.request("GET", "/metrics/performance")

    def get_security(self):
        return self.client.request("GET", "/metrics/security")

    def get_active_collections(self, limit=5):
        return self.client.request("GET", "/metrics/collections/active", params={"limit": limit})

    def clear_cache(self):
        return self.client.request("POST", "/metrics/cache/clear")
