Let's consider the following example:
@dataclass
class MemorySnapshot:
"""A snapshot of memory usage.
Args:
total_bytes: Total memory available in the system.
current_bytes: Memory usage of the current Python process and its children.
max_memory_bytes: The maximum memory that can be used by `AutoscaledPool`.
max_used_memory_ratio: The maximum acceptable ratio of `current_bytes` to `max_memory_bytes`.
created_at: The time at which the measurement was taken.
"""
total_bytes: int
current_bytes: int
max_memory_bytes: int
max_used_memory_ratio: float
created_at: datetime = field(default_factory=lambda: datetime.now(tz=timezone.utc))
@property
def is_overloaded(self) -> bool:
"""Returns whether the memory is considered as overloaded."""
return (self.current_bytes / self.max_memory_bytes) > self.max_used_memory_ratio
Is doc tooling (maybe the one we use in SDK) able to handle it properly?
Based on the discussion in here #20 (comment).
Let's consider the following example:
Is doc tooling (maybe the one we use in SDK) able to handle it properly?
Based on the discussion in here #20 (comment).