Branch: refs/heads/master
Home:
https://github.com/Checkmk/checkmk
Commit: 9c435ed8c74912c2a3edd491c568ac9214865ecb
https://github.com/Checkmk/checkmk/commit/9c435ed8c74912c2a3edd491c568ac921…
Author: Christoph Rauch <christoph.rauch(a)checkmk.com>
Date: 2023-11-21 (Tue, 21 Nov 2023)
Changed paths:
M Pipfile
M Pipfile.lock
M cmk/gui/wsgi/app.py
M cmk/gui/wsgi/dev_server.py
R cmk/gui/wsgi/profiling.py
A cmk/utils/profile_switcher.py
M tests/code_quality/test_pipfile.py
M tests/unit/cmk/gui/wsgi/test_profile_switcher.py
M web/app/index.wsgi
Log Message:
-----------
Profiling middleware: allow for profiling the application startup phase
* Introduce ProfileSwitcher middleware
* Adapt profiling tests to reflect new calling convention
* Adapt index.wsgi to use the new structure
* Remove old middleware from Flask app
* Update Pipfile: remove no longer necessary repoze.profile
middleware, make pyprof2calltree am explicit dependency.
The ProfileSwitcher middleware can now import the wrapped app
at runtime, so that importing and initialization can be profiled
as well. To achieve this, a default "config" is used for the
very first request, when no config could have been loaded yet.
For the first request, it is intentional that triggering the
profiling middleware via a "_profile" GET query-string parameter
is possible.
The subsequent requests will honor the configured profiling behavior.
CMK-14511
Change-Id: I33514e6395bcfb4849c421daa9647c944fffe319