From a55a48ffc8bdd04a4876a01b92b204302bd62881 Mon Sep 17 00:00:00 2001 From: Tim Burke Date: Fri, 6 Dec 2024 14:24:34 -0800 Subject: [PATCH] docs: Call out that xprofile is not intended for production Change-Id: I1e9d4d5df403040d69db93a08647cd0abe1b8037 --- etc/account-server.conf-sample | 3 ++- etc/container-server.conf-sample | 3 ++- etc/object-server.conf-sample | 5 +++-- etc/proxy-server.conf-sample | 1 + swift/common/middleware/xprofile.py | 5 +++++ 5 files changed, 13 insertions(+), 4 deletions(-) diff --git a/etc/account-server.conf-sample b/etc/account-server.conf-sample index 8df91428fd..241156164c 100644 --- a/etc/account-server.conf-sample +++ b/etc/account-server.conf-sample @@ -297,7 +297,8 @@ use = egg:swift#backend_ratelimit # ionice_priority = # Note: Put it at the beginning of the pipeline to profile all middleware. But -# it is safer to put this after healthcheck. +# it is safer to put this after healthcheck. Not intended for production +# environments! [filter:xprofile] use = egg:swift#xprofile # This option enable you to switch profilers which should inherit from python diff --git a/etc/container-server.conf-sample b/etc/container-server.conf-sample index 5850da9cf9..a5750db919 100644 --- a/etc/container-server.conf-sample +++ b/etc/container-server.conf-sample @@ -339,7 +339,8 @@ use = egg:swift#backend_ratelimit # ionice_priority = # Note: Put it at the beginning of the pipeline to profile all middleware. But -# it is safer to put this after healthcheck. +# it is safer to put this after healthcheck. Not intended for production +# environments! [filter:xprofile] use = egg:swift#xprofile # This option enable you to switch profilers which should inherit from python diff --git a/etc/object-server.conf-sample b/etc/object-server.conf-sample index b7dd07956a..ed1f0da784 100644 --- a/etc/object-server.conf-sample +++ b/etc/object-server.conf-sample @@ -728,10 +728,11 @@ use = egg:swift#backend_ratelimit # N.B. By default no delay_reaping value is configured for any accounts or # containers. +# Note: Put it at the beginning of the pipleline to profile all middleware. But +# it is safer to put this after healthcheck. Not intended for production +# environments! [filter:xprofile] use = egg:swift#xprofile -# Note: Put it at the beginning of the pipleline to profile all middleware. But -# it is safer to put this after healthcheck. # This option enable you to switch profilers which should inherit from python # standard profiler. Currently the supported value can be 'cProfile', # 'eventlet.green.profile' etc. diff --git a/etc/proxy-server.conf-sample b/etc/proxy-server.conf-sample index d290ea78b2..b29d03adc8 100644 --- a/etc/proxy-server.conf-sample +++ b/etc/proxy-server.conf-sample @@ -1169,6 +1169,7 @@ use = egg:swift#container_sync # Note: Put it at the beginning of the pipeline to profile all middleware. But # it is safer to put this after catch_errors, gatekeeper and healthcheck. +# Not intended for production environments! [filter:xprofile] use = egg:swift#xprofile # This option enable you to switch profilers which should inherit from python diff --git a/swift/common/middleware/xprofile.py b/swift/common/middleware/xprofile.py index 3ab1f1502d..36425e6fa8 100644 --- a/swift/common/middleware/xprofile.py +++ b/swift/common/middleware/xprofile.py @@ -16,6 +16,11 @@ """ Profiling middleware for Swift Servers. +.. note:: + This middleware is intended for development and testing environments only, + not production. No authentication is expected or required for the web UI, + and profiling may incur noticeable performance penalties. + The current implementation is based on eventlet aware profiler.(For the future, more profilers could be added in to collect more data for analysis.) Profiling all incoming requests and accumulating cpu timing statistics