/benchmark_tool

Python based benchmark automation for system monitoring and plotting system usage

Primary LanguagePython

Automate Benchmark testing using python script

monitor.py

This script is used to automate benchmark runs, with single process client and server. This script launch server and after some delay the client. And terminates the server once the client terminates. Also it launches monitoring programs to monitor client and server system usage like CPU and Memory using psutil package. Also it supports logging client and server standard output and error logs to separate log files.

System usages of client and server are logged to files with postfix -monitor-client.log and -monitor-server.log respectively.

NOTE: It handles only single process client and server

Usage: python3 monitor.py --scenario "some benchmark name" --client "the client command" --server "the server command" [ --log ]

Example: python3 monitor.py --scenario dummy_test --client "./client" --server "./server" --log

plot.py

This script is used to plot the system metrics obtained from the monitor.py script. This script plots the server and client metrics side by side on the same plot.

Usage: python3 plot.py --scenario "the scenario to plot"

Example: python3 plot.py --scenario dummy_test

process_graph.py

This script contains functionality to monitor the branching pattern of given process, monitors number of processes it forks and monitors all the processes generated by these processes and generates a process hierarchy in form of Cladogram with length of each line capturing the time that a process existed. Splitting is used to model the forking behaviour To monitor a process to obtain the branching pattern, call

process_graph.monitor_process_branches_daemon

method from the process, which will generate the log file containing process start and end times as well as parent child relationships.

To generate graph using that log file, call the

process_graph.generate_process_branching_image

to generate a image containing the process branching relation in form of Cladogram. Examples: forks.py and steps.py are some applications with use the monitoring functionality to generate logs. After running some example, run the process_graph.py to generate the graph with default arguments.