From 8659ce05f645109fb3185b301cb31d1c919ebb10 Mon Sep 17 00:00:00 2001 From: DonnieBLT <128622481+DonnieBLT@users.noreply.github.com> Date: Wed, 1 Jan 2025 17:59:45 -0500 Subject: [PATCH] Refactor memory usage limit and improve code formatting in core.py --- website/views/core.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/views/core.py b/website/views/core.py index 8475d6ea1..f040f740e 100644 --- a/website/views/core.py +++ b/website/views/core.py @@ -61,7 +61,7 @@ # ---------------------------------------------------------------------------------- -def memory_usage_by_module(limit=20): +def memory_usage_by_module(limit=10): """ Returns a list of (filename, size_in_bytes) for the top `limit` files by allocated memory, using tracemalloc. @@ -267,7 +267,7 @@ def check_status(request): # Memory usage by module (via tracemalloc) # ------------------------------------------------------- print("Calculating memory usage by module...") - top_modules = memory_usage_by_module(limit=20) + top_modules = memory_usage_by_module(limit=10) status_data["memory_by_module"] = top_modules # -------------------------------------------------------