A pytest plugin for analyzing resource usage (CPU, memory, I/O) of tests. It records resource consumption and optionally sends results to a monitoring server. The current version is 1.6.6, with a maintenance cadence of a few releases per year.
pip install pytest-monitorNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Basic usage: install, write a test, and run with the --monitor flag to record results into a SQLite database.
Upgrade Python to >=3.7 and pytest to >=6.0 when moving beyond 1.6.6.
Use --monitor-server instead of --send-results.
Upgrade to 1.6.0 or later, or exclude doctests from monitoring.
Set CPU_FREQUENCY env var (e.g., export CPU_FREQUENCY=2400) or upgrade to 1.6.5+ if possible.
Install with 'pip install pytest-monitor'. The import is not needed; the plugin is auto-discovered.
Ensure pytest-monitor is installed (pip list | grep pytest-monitor) and that you are running pytest from the correct environment.
Set the environment variable CPU_FREQUENCY to your CPU's frequency in MHz (e.g., export CPU_FREQUENCY=2400) or upgrade to 1.6.5+ where a fallback is handled.