Skip to content

Instantly share code, notes, and snippets.

@Lupino
Last active August 19, 2017 02:39
Show Gist options
  • Save Lupino/495923a23ae0a6763282e0881e6e8e20 to your computer and use it in GitHub Desktop.
Save Lupino/495923a23ae0a6763282e0881e6e8e20 to your computer and use it in GitHub Desktop.

memory_profiler is a python module for monitoring memory consumption of a process as well as line-by-line analysis of memory consumption for python programs.

Build image

docker build -t containerops/memory_profiler .

Test

docker run --rm -e CO_DATA='git-url=https://github.com/fabianp/memory_profiler.git entry-file=test/test_func.py' containerops/memory_profiler
# test with python2
docker run --rm -e CO_DATA='git-url=https://github.com/fabianp/memory_profiler.git entry-file=test/test_func.py version=python' containerops/memory_profiler

CO_DATA arguments

  • git-url is the source git repo url
  • version is one of python, python2, python3, py3k. default is py3k
  • entry-file is the entry file for memory profile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment