From 7cd9347b50ccce42e92a8171f6e1c9e2e217147d Mon Sep 17 00:00:00 2001 From: DonnieBLT <128622481+DonnieBLT@users.noreply.github.com> Date: Wed, 1 Jan 2025 17:46:58 -0500 Subject: [PATCH] Reduce memory usage limit in memory_usage_by_module function and improve code formatting across multiple functions --- 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 dfc83df14..8475d6ea1 100644 --- a/website/views/core.py +++ b/website/views/core.py @@ -61,7 +61,7 @@ # ---------------------------------------------------------------------------------- -def memory_usage_by_module(limit=100): +def memory_usage_by_module(limit=20): """ 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=100) + top_modules = memory_usage_by_module(limit=20) status_data["memory_by_module"] = top_modules # -------------------------------------------------------