ska_sdp_batchlet.utils.monitor.resource module

class ska_sdp_batchlet.utils.monitor.resource.ResourceMonitor(generate_reports_on_failure=True, working_directory='./benchmon-work-dir', start=None, stop=None)[source]

Bases: object

ResourceMonitor is responsible for monitoring the system resources (CPU, Memory) on single/multi-node system, while the subprocess command is running. It uses ska-sdp-benchmark-monitor for resource monitoring. This class should be instantiated and used within a "with" scope.

Parameters:
  • generate_reports_on_failure (bool, default: True) -- Whether to generate reports even if some exception occurs during exit

  • working_directory (str, default: './benchmon-work-dir') -- Directory where the subprocess are run

  • start (dict | None, default: None) -- CLI arguments required by benchmon-start

  • stop (dict | None, default: None) -- CLI arguments required by benchmon-stop