From 3c0267c98a21175f4fc8edea0ff8be391e3a1c2b Mon Sep 17 00:00:00 2001 From: Peter Bieringer Date: Mon, 8 Dec 2025 12:29:43 +0100 Subject: [PATCH] profiling: add options --- radicale/config.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/radicale/config.py b/radicale/config.py index a4ba6610..5ec5908f 100644 --- a/radicale/config.py +++ b/radicale/config.py @@ -41,6 +41,8 @@ from radicale import auth, hook, rights, storage, types, web from radicale.hook import email from radicale.item import check_and_sanitize_props +from radicale import app # isort:skip (circular import issue) + DEFAULT_CONFIG_PATH: str = os.pathsep.join([ "?/etc/radicale/config", "?~/.config/radicale/config"]) @@ -581,6 +583,23 @@ This is an automated message. Please do not reply.""", "value": "False", "help": "log storage cache action on level=debug", "type": bool}), + ("profiling", { + "value": "per_request_method", + "help": "log profiling data level=info", + "type": str, + "internal": app.PROFILING}), + ("profiling_per_request_min_duration", { + "value": "3", + "help": "log profiling data per request minimum duration (seconds)", + "type": int}), + ("profiling_per_request_method_interval", { + "value": "600", + "help": "log profiling data per request method interval (seconds)", + "type": int}), + ("profiling_top_x_functions", { + "value": "10", + "help": "log profiling top X functions (limit)", + "type": int}), ("mask_passwords", { "value": "True", "help": "mask passwords in logs",