nproc=$(nproc)
duration=30

echo Running without loads on $HOSTNAME
bpftrace func_benchmark.bt "$duration"
sleep "$duration"

echo Running with cpu loads on $HOSTNAME
stress-ng --cpu "$nproc" --cpu-load 80 &> /dev/null &
bpftrace func_benchmark.bt "$duration"
pkill stress-ng
sleep "$duration"

echo Running with fork loads on $HOSTNAME
stress-ng --fork "$nproc" &> /dev/null &
bpftrace func_benchmark.bt "$duration"
pkill stress-ng
sleep "$duration"

echo Running with thread loads on $HOSTNAME
stress-ng --pthread "$nproc" --pthread-max 4 &> /dev/null &
bpftrace func_benchmark.bt "$duration"
pkill stress-ng
