mirror of
https://github.com/element-hq/synapse
synced 2024-10-01 05:12:41 +00:00
Move TRACK_MEMORY_USAGE to root
This commit is contained in:
parent
567fe5e387
commit
99fb72e63e
2 changed files with 6 additions and 5 deletions
|
@ -24,6 +24,11 @@ from synapse.config.cache import add_resizable_cache
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
|
# Whether to track estimated memory usage of the LruCaches.
|
||||||
|
TRACK_MEMORY_USAGE = False
|
||||||
|
|
||||||
|
|
||||||
caches_by_name = {} # type: Dict[str, Sized]
|
caches_by_name = {} # type: Dict[str, Sized]
|
||||||
collectors_by_name = {} # type: Dict[str, CacheMetric]
|
collectors_by_name = {} # type: Dict[str, CacheMetric]
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,7 @@ from typing import (
|
||||||
from typing_extensions import Literal
|
from typing_extensions import Literal
|
||||||
|
|
||||||
from synapse.config import cache as cache_config
|
from synapse.config import cache as cache_config
|
||||||
from synapse.util.caches import CacheMetric, register_cache
|
from synapse.util.caches import TRACK_MEMORY_USAGE, CacheMetric, register_cache
|
||||||
from synapse.util.caches.treecache import TreeCache
|
from synapse.util.caches.treecache import TreeCache
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
@ -59,10 +59,6 @@ except ImportError:
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
|
|
||||||
# Whether to track estimated memory usage of the LruCaches.
|
|
||||||
TRACK_MEMORY_USAGE = False
|
|
||||||
|
|
||||||
|
|
||||||
# Function type: the type used for invalidation callbacks
|
# Function type: the type used for invalidation callbacks
|
||||||
FT = TypeVar("FT", bound=Callable[..., Any])
|
FT = TypeVar("FT", bound=Callable[..., Any])
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue