mirror of
https://github.com/apache/superset.git
synced 2026-04-19 16:14:52 +00:00
feat: add profiling to Superset pages (#16136)
* feat: add profiling to Superset pages * Address comments
This commit is contained in:
@@ -42,6 +42,7 @@ from superset.extensions import (
|
||||
machine_auth_provider_factory,
|
||||
manifest_processor,
|
||||
migrate,
|
||||
profiling,
|
||||
results_backend_manager,
|
||||
talisman,
|
||||
)
|
||||
@@ -566,6 +567,7 @@ class SupersetAppInitializer:
|
||||
self.configure_db_encrypt()
|
||||
self.setup_db()
|
||||
self.configure_celery()
|
||||
self.enable_profiling()
|
||||
self.setup_event_logger()
|
||||
self.setup_bundle_manifest()
|
||||
self.register_blueprints()
|
||||
@@ -716,6 +718,10 @@ class SupersetAppInitializer:
|
||||
def setup_bundle_manifest(self) -> None:
|
||||
manifest_processor.init_app(self.superset_app)
|
||||
|
||||
def enable_profiling(self) -> None:
|
||||
if self.config["PROFILING"]:
|
||||
profiling.init_app(self.superset_app)
|
||||
|
||||
|
||||
class SupersetIndexView(IndexView):
|
||||
@expose("/")
|
||||
|
||||
Reference in New Issue
Block a user