mirror of
https://github.com/csunny/DB-GPT.git
synced 2025-10-23 01:49:58 +00:00
refactor: The first refactored version for sdk release (#907)
Co-authored-by: chengfangyin2 <chengfangyin3@jd.com>
This commit is contained in:
11
dbgpt/util/memory_utils.py
Normal file
11
dbgpt/util/memory_utils.py
Normal file
@@ -0,0 +1,11 @@
|
||||
from typing import Any
|
||||
from pympler import asizeof
|
||||
|
||||
|
||||
def _get_object_bytes(obj: Any) -> int:
|
||||
"""Get the bytes of a object in memory
|
||||
|
||||
Args:
|
||||
obj (Any): The object to return the bytes
|
||||
"""
|
||||
return asizeof.asizeof(obj)
|
Reference in New Issue
Block a user