"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""

from __future__ import annotations
from mixpeek.types import BaseModel
from typing import Dict, Optional
from typing_extensions import NotRequired, TypedDict


class CacheStatsTypedDict(TypedDict):
    r"""Statistics about cache usage"""

    hits: NotRequired[int]
    r"""Number of cache hits"""
    misses: NotRequired[int]
    r"""Number of cache misses"""
    size: NotRequired[int]
    r"""Number of entries in cache"""
    hit_ratio: NotRequired[float]
    r"""Cache hit ratio"""
    retriever_stats: NotRequired[Dict[str, Dict[str, int]]]
    r"""Statistics per retriever"""


class CacheStats(BaseModel):
    r"""Statistics about cache usage"""

    hits: Optional[int] = 0
    r"""Number of cache hits"""

    misses: Optional[int] = 0
    r"""Number of cache misses"""

    size: Optional[int] = 0
    r"""Number of entries in cache"""

    hit_ratio: Optional[float] = 0
    r"""Cache hit ratio"""

    retriever_stats: Optional[Dict[str, Dict[str, int]]] = None
    r"""Statistics per retriever"""
