PLAT-1957 Better memory leak diagnostic tooling

This commit is contained in:
Jeremy Bowman
2018-02-14 17:48:25 -05:00
parent 730c64011b
commit a022461891
12 changed files with 582 additions and 22 deletions

View File

@@ -43,6 +43,7 @@ from __future__ import absolute_import
import imp
import os
import tempfile
import sys
from datetime import timedelta
@@ -322,7 +323,6 @@ GEOIPV6_PATH = REPO_ROOT / "common/static/data/geoip/GeoIPv6.dat"
############################# TEMPLATE CONFIGURATION #############################
# Mako templating
import tempfile
MAKO_MODULE_DIR = os.path.join(tempfile.gettempdir(), 'mako_cms')
MAKO_TEMPLATE_DIRS_BASE = [
PROJECT_ROOT / 'templates',
@@ -447,11 +447,10 @@ else:
_csrf_middleware = 'django.middleware.csrf.CsrfViewMiddleware'
MIDDLEWARE_CLASSES = [
'openedx.core.djangoapps.monitoring_utils.middleware.MonitoringMemoryMiddleware',
'crum.CurrentRequestUserMiddleware',
'openedx.core.djangoapps.request_cache.middleware.RequestCache',
'openedx.core.djangoapps.monitoring_utils.middleware.MonitoringMemoryMiddleware',
'openedx.core.djangoapps.header_control.middleware.HeaderControlMiddleware',
'django.middleware.cache.UpdateCacheMiddleware',
'django.middleware.common.CommonMiddleware',
@@ -515,6 +514,9 @@ X_FRAME_OPTIONS = 'ALLOW'
# Platform for Privacy Preferences header
P3P_HEADER = 'CP="Open EdX does not have a P3P policy."'
# Let MemoryUsageData create the directory as needed
MEMORY_GRAPH_DIRECTORY = None
############# XBlock Configuration ##########
# Import after sys.path fixup
@@ -1127,6 +1129,9 @@ INSTALLED_APPS = [
# Asset management for mako templates
'pipeline_mako',
# Memory leak diagnostics
'openedx.core.djangoapps.monitoring_utils.apps.MonitoringUtilsConfig'
]