is it possible to measure the total time spent in an analysis?
On Fri, 20 Jan 2012, Md. Golam Rashed wrote:
is it possible to measure the total time spent in an analysis?
The easiest is to use "time" command - this works in linux, and in windows in gitbash:
time ./simple.py ...
Then ipython might help somehow but I cannot try it right now.
r.
it gives something like- real 0m24.882s user 0m0.031s sys 0m0.123s
it seems there are 3 kind of time. what does it mean?
from internet-
One οf thеѕе things іѕ nοt Ɩіkе thе οthеr. Real refers tο actual elapsed time; User аnԁ Sys refer tο CPU time used οnƖу bу thе process.
Real: іѕ wall timer time – time frοm ѕtаrt tο еnԁ οf thе call. Thіѕ іѕ аƖƖ elapsed time including time slices used bу οthеr processes аnԁ time thе process spends blocked (fοr example іf іt іѕ waiting fοr I/O tο complete).
User: іѕ thе amount οf CPU time spent іn user-mode code (outside thе kernel) within thе process. Thіѕ іѕ οnƖу actual CPU time used іn executing thе process. Othеr processes аnԁ time thе process spends blocked ԁο nοt count towards thіѕ map.
Sys: іѕ thе amount οf CPU time spent іn thе kernel within thе process. Thіѕ means executing CPU time spent іn system calls within thе kernel, аѕ opposed tο library code, whісh іѕ still running іn user-space. Lіkе ‘user’, thіѕ іѕ οnƖу CPU time used bу thе process. See nοt more thаn fοr a brief description οf kernel mode (аƖѕο known аѕ ‘supervisor’ mode) аnԁ thе system call mechanism.
User+Sys wіƖƖ tеƖƖ уου hοw much actual CPU time уουr process used.
So, real time does not necessarily equal user time + sys time on a multiprocessor system. User Time + Sys Time is the time spent by the CPU, while real time is the real amount of time used.
Which time should i use to measure the execution time for a program? (I'm guessing it'll be user+sys)
I usually use the "real" time, as it is the one that is interesting for users - it's the time you have to wait. Of course, it is good to average times of several runs, and not to stress the system too much.
But user+sys is also ok, you just have to explain it properly.
Also in Python, it is pretty standard to use time.clock() function. So you can add some timing to simple.py, if you like.
tt = time.clock()
... do stuff
print time.clock() - tt
Anyway, averaging times of several runs never hurts.
r.
On 01/22/12 18:04, Md. Golam Rashed wrote:
from internet-
One οf thеѕе things іѕ nοt Ɩіkе thе οthеr. Real refers tο actual elapsed time; User аnԁ Sys refer tο CPU time used οnƖу bу thе process.
Real: іѕ wall timer time – time frοm ѕtаrt tο еnԁ οf thе call. Thіѕ іѕ аƖƖ elapsed time including time slices used bу οthеr processes аnԁ time thе process spends blocked (fοr example іf іt іѕ waiting fοr I/O tο complete).
User: іѕ thе amount οf CPU time spent іn user-mode code (outside thе kernel) within thе process. Thіѕ іѕ οnƖу actual CPU time used іn executing thе process. Othеr processes аnԁ time thе process spends blocked ԁο nοt count towards thіѕ map.
Sys: іѕ thе amount οf CPU time spent іn thе kernel within thе process. Thіѕ means executing CPU time spent іn system calls within thе kernel, аѕ opposed tο library code, whісh іѕ still running іn user-space. Lіkе ‘user’, thіѕ іѕ οnƖу CPU time used bу thе process. See nοt more thаn fοr a brief description οf kernel mode (аƖѕο known аѕ ‘supervisor’ mode) аnԁ thе system call mechanism.
User+Sys wіƖƖ tеƖƖ уου hοw much actual CPU time уουr process used.
So, real time does not necessarily equal user time + sys time on a multiprocessor system. User Time + Sys Time is the time spent by the CPU, while real time is the real amount of time used.
Which time should i use to measure the execution time for a program? (I'm guessing it'll be user+sys)
ok, but if i only want to use the cpu time (sys+user), what happens then?? and what direct solvers sfepy supports aside from umfpack and superLU??
On 01/23/12 16:23, Md. Golam Rashed wrote:
ok, but if i only want to use the cpu time (sys+user), what happens then??
What do you mean? It's ok to use that, yes.
and what direct solvers sfepy supports aside from umfpack and superLU??
Only those for the moment. The other supported solvers are iterative.
r.
my guess is we'll use iterative solver for non-linear problem. however, i'd like to have a list. sfepy direct solver-
sfepy iterative solver- 1.......
On 01/23/12 18:17, Md. Golam Rashed wrote:
my guess is we'll use iterative solver for non-linear problem. however, i'd like to have a list. sfepy direct solver-
- superLU
- Umfpack
sfepy iterative solver- 1.......
See http://docs.sfepy.org/doc-devel/src/sfepy/solvers/ls.html
There are no such explicit lists, but you can find this information in the module index of developer guide (also for other solvers).
r.
Hi, I can measure the time required for analysis by "time" function. how can I measure system resources used during analysis (e.g. ram, hdd etc)
thanks.
On Monday, January 23, 2012 11:24:16 PM UTC+6, Robert Cimrman wrote:
On 01/23/12 18:17, Md. Golam Rashed wrote:
my guess is we'll use iterative solver for non-linear problem. however,
i'd
like to have a list. sfepy direct solver-
- superLU
- Umfpack
sfepy iterative solver- 1.......
See http://docs.sfepy.org/doc-devel/src/sfepy/solvers/ls.html
There are no such explicit lists, but you can find this information in the module index of developer guide (also for other solvers).
r.
Hi,
google found this: http://code.google.com/p/pympler/
I just use htop on linux. On windows, IMHO the easiest thing is to launch the task manager.
r.
On 04/05/2012 09:52 PM, Md. Golam Rashed wrote:
Hi, I can measure the time required for analysis by "time" function. how can I measure system resources used during analysis (e.g. ram, hdd etc)
thanks.
On Monday, January 23, 2012 11:24:16 PM UTC+6, Robert Cimrman wrote:
On 01/23/12 18:17, Md. Golam Rashed wrote:
my guess is we'll use iterative solver for non-linear problem. however,
i'd
like to have a list. sfepy direct solver-
- superLU
- Umfpack
sfepy iterative solver- 1.......
See http://docs.sfepy.org/doc-devel/src/sfepy/solvers/ls.html
There are no such explicit lists, but you can find this information in the module index of developer guide (also for other solvers).
r.
Okay, so the trick is to view the process consumption.
I think this will suffice for win 7 -
http://technet.microsoft.com/en-us/sysinternals/bb896653
http://code.google.com/p/pympler/ is a python memory behavior measure tool, but sfepy uses external solvers too. so will it give correct result?
On Friday, April 6, 2012 2:40:41 PM UTC+6, Robert Cimrman wrote:
Hi,
google found this: http://code.google.com/p/pympler/
I just use htop on linux. On windows, IMHO the easiest thing is to launch the task manager.
r.
On 04/05/2012 09:52 PM, Md. Golam Rashed wrote:
Hi, I can measure the time required for analysis by "time" function. how can I measure system resources used during analysis (e.g. ram, hdd
etc)
thanks.
On Monday, January 23, 2012 11:24:16 PM UTC+6, Robert Cimrman wrote:
On 01/23/12 18:17, Md. Golam Rashed wrote:
my guess is we'll use iterative solver for non-linear problem. however,
i'd
like to have a list. sfepy direct solver-
- superLU
- Umfpack
sfepy iterative solver- 1.......
See http://docs.sfepy.org/doc-devel/src/sfepy/solvers/ls.html
There are no such explicit lists, but you can find this information in
the
module index of developer guide (also for other solvers).
r.
On Fri, 6 Apr 2012, Md. Golam Rashed wrote:
Okay, so the trick is to�view�the process consumption.I think this will suffice for win 7 -� http://technet.microsoft.com/en-us/sysinternals/bb896653%C3%83%C2%AF%C3%82%C...
http://code.google.com/p/pympler/%C3%83%C2%AF%C3%82%C2%BF%C3%82%C2%BDis a python memory�behavior�measure tool, but sfepy uses external solvers too. so will it give correct result?
No idea, never tried that tool...
r.