Commit 2194d390 by John Eskew

Remove memory dump signal until meliae packaging issues are resolved.

parent 9d93c750
......@@ -6,9 +6,6 @@ defuse_xml_libs()
import contracts
contracts.disable_all()
import openedx.core.operations
openedx.core.operations.install_memory_dumper()
import os
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "cms.envs.aws")
......
......@@ -16,9 +16,6 @@ defuse_xml_libs()
import contracts
contracts.disable_all()
import openedx.core.operations
openedx.core.operations.install_memory_dumper()
import os
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "lms.envs.aws")
......
"""
Workflows useful for reporting on runtime characteristics of the system
"""
import gc
import os
import signal
import tempfile
from datetime import datetime
from meliae import scanner
def dump_memory(signum, frame):
"""
Dump memory stats for the current process to a temp directory.
Uses the meliae output format.
"""
timestamp = datetime.now().isoformat()
format_str = '{}/meliae.{}.{}.{{}}.dump'.format(
tempfile.gettempdir(),
timestamp,
os.getpid(),
)
scanner.dump_all_objects(format_str.format('pre-gc'))
# force garbarge collection
for gen in xrange(3):
gc.collect(gen)
scanner.dump_all_objects(
format_str.format("gc-gen-{}".format(gen))
)
def install_memory_dumper(dump_signal=signal.SIGPROF):
"""
Install a signal handler on `signal` to dump memory stats for the current process.
"""
signal.signal(dump_signal, dump_memory)
......@@ -68,9 +68,6 @@ httpretty==0.8.3
lazy==1.1
mako==1.0.2
Markdown>=2.6,<2.7
--allow-external meliae
--allow-unverified meliae
meliae==0.4.0
mongoengine==0.10.0
MySQL-python==1.2.5
networkx==1.7
......
......@@ -12,6 +12,3 @@ pip==9.0.1
# Numpy and scipy can't be installed in the same pip run.
# Install numpy before other things to help resolve the problem.
numpy==1.6.2
# Needed for meliae
Cython==0.21.2
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment