Browser Memory Monitor is a Python tool to track and limit the amount of memory used by a subprocess such as a browser under test.
usage: bmm [-h] [--force] [--format {mprof,csv}] [--interval INTERVAL] [--limit LIMIT] [--pre-interval PRE_INTERVAL] [--time-limit TIME_LIMIT] [--verbose] [--version] browser data command [...]Memory profiler/limiter for browserspositional arguments: browser Browser process name to monitor (eg. 'firefox') data Profiling data output filename command [...] Command (and args) to execute as a subprocessoptions: -h, --help show this help message and exit --force, -f Overwrite existing data output file. --format {mprof,csv}, -F {mprof,csv} Output format (choices: mprof, csv, default: mprof) --interval INTERVAL, -T INTERVAL Memory profiling interval (default: 0.1) --limit LIMIT, -m LIMIT Memory limit in MiB (0 for no limit, default: 12288) --pre-interval PRE_INTERVAL, -P PRE_INTERVAL Process start interval (default: 0.01) --time-limit TIME_LIMIT, -t TIME_LIMIT Maximum time to run (in seconds, 0 for no limit, default: 0) --verbose, -v Enable verbose logging --version, -V Show version number