#!/bin/sh
#=
if [ $# -eq 0 ] || [ $# -eq 1 ]
then
    echo "No arguments supplied"
    echo "Usage: ./stresstest <NoOfThreads> <timeInMinutes>"
    exit
fi
exec julia -t $1 --project=$(dirname $0)/ "$0" -- $@
=#

using GPUInspector
using CairoMakie


function main()
  duration = parse(Int64,ARGS[2]) * 60
  results = stresstest(devices(); duration=duration, monitoring=true) 

  save_monitoring_results("data.hdf5",results)
  plot_monitoring_results(results)
  savefig_monitoring_results(results)
end


main()
