Skip to content

emerald-geomodelling/emerald-monitor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This is a simple monitoring class built around psutil. The idea is that this will monitor cpu and ram usage between starting and stopping the monitoring.

  1. To use simply import the package: from emerald_monitor import ResourceMonitor

  2. Then you can initialize the monitor: monitor = ResourceMonitor()

  3. Start the logger: monitor.start_logging()

  4. Run any function or process

  5. Stop the logger: monitor.stop_logging()

You can view a plot of the logs using:

  • monitor.plot_logs()
  • image

and, you can view the logs as a pandas dataframe:

  • monitor_info = monitor.get_logs().
  • image

And, of course you can export the logs using pandas export options. For example:

  • monitor_info.to_csv(<output file path>, index=False)

See the example usage notebook for a more detailed out line of the usage

About

a library to monitor the cpu and memory used by a process

Resources

License

Stars

Watchers

Forks

Packages

No packages published