Skip to content

Instantly share code, notes, and snippets.

@ashokc
Created February 16, 2020 19:44
Show Gist options
  • Save ashokc/164f38aa174c56f263ac7834bdb70e50 to your computer and use it in GitHub Desktop.
Save ashokc/164f38aa174c56f263ac7834bdb70e50 to your computer and use it in GitHub Desktop.
#!/bin/bash
/usr/bin/cmonitor_collector --sampling-interval=3 --output-filename=./system_metrics.json # start gathering memory/cpu usage sats
sleep 10
pipenv run locust -f ./load_tests.py --host localhost --csv ./results -c 500 -r 10 -t 60m --no-web
sleep 10
pid=$(ps -ef | grep 'cmonitor_collector' | grep -v 'grep' | awk '{ print $2 }')
kill -15 $pid # stop the monitor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment