From be7b3e7f511b67e18387bf0468c0ad5438d602a8 Mon Sep 17 00:00:00 2001 From: Lev Gorodetskiy Date: Sun, 15 Dec 2024 10:08:59 -0300 Subject: [PATCH] fix metric stats --- src/dipdup/performance.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dipdup/performance.py b/src/dipdup/performance.py index 314fe08e6..01a1d0e8e 100644 --- a/src/dipdup/performance.py +++ b/src/dipdup/performance.py @@ -341,7 +341,7 @@ def _round(value: Any) -> Any: return round(value, 2) return value - return {k: _round(v) for k, v in self.__dict__.items() if not k.startswith('_')} + return {k: _round(getattr(self, k)) for k in dir(self) if not k.startswith('_') and isinstance(getattr(self, k), Metric)} caches = _CacheManager()