0
I need to take the average running time and consumption of CPU de 30 execuções
of a program made in Python
. I have to use the remote time
of Linux
. Like I’ve never worked with Linux
before I’m having trouble doing this.
This is the code I’ve made so far (not working). Could someone help me make it 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
This also works with Jython, Ironpython and Pypy?
– user25946
I have no idea, but the module is written in pure Python; the module that can cause you more problems (because it is unavailable) is the
gc
, exposing low-level Python features.– user25930
You are giving this error: Nameerror: global name 'ex1_threading' is not defined
– user25946
So it doesn’t work. :(
– user25930