I need to take the average run time and CPU de 30 execuções
consumption of a program done in Python
. I have to use the command time
of Linux
. Since I've never worked with Linux
before I'm having trouble doing this.
This is the code I have made so far (not working). Could someone help me make this work?
size=400
n_cpu=4
/usr/bin/time -f "CPU: %p TIME: %e"
for i in {1..30};
do
python "script.py" $size $size $n_cpu
done