comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Is there any way to check running speed?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Is there any way to check running speed? [message #52647] Fri, 16 February 2007 18:18
kim20026 is currently offline  kim20026
Messages: 54
Registered: November 2006
Member
Thank you for your comments, everyone!!! These tips are very useful to
modify my sourcecodes. Happy new year!!! (<- We have new years day
(lunar calendar) this weekend in Korea!)

On Feb 16, 6:04 am, Paul van Delst <Paul.vanDe...@noaa.gov> wrote:
> Bob Crawford wrote:
>> I think prehaps what the OP is looking for is a way to get the elapsed
>> time of execution of the code minus any time spent while he stops the
>> code to verify it is working properly.
>
>> Without knowing how the OP "stops" his code for these checks, it's not
>> really possible to know if it's possible. If he has coded a pause/
>> resume function then the time spent stopped in that function could be
>> calculated (as suggested above), and then subtracted from the total
>> execution time (calculated again as suggested above by bob).
>
>> Alternately I would suggest that the OP first makes sure that his code
>> works correctly, and then worry about execution time, thus removing
>> the need to stop mid run.
>
> Alternatively, a wall clock would do the job pretty well in this sort of scenario since
> +/- 5 minutes is probably a high resolution measurement.
>
> Unless, of course, he charges his time like a lawyer.... :o)
>
> cheers,
>
> paulv
>
> --
> Paul van Delst Ride lots.
> CIMSS @ NOAA/NCEP/EMC Eddy Merckx
Re: Is there any way to check running speed? [message #52667 is a reply to message #52647] Thu, 15 February 2007 13:04 Go to previous message
Paul Van Delst[1] is currently offline  Paul Van Delst[1]
Messages: 1157
Registered: April 2002
Senior Member
Bob Crawford wrote:
> I think prehaps what the OP is looking for is a way to get the elapsed
> time of execution of the code minus any time spent while he stops the
> code to verify it is working properly.
>
> Without knowing how the OP "stops" his code for these checks, it's not
> really possible to know if it's possible. If he has coded a pause/
> resume function then the time spent stopped in that function could be
> calculated (as suggested above), and then subtracted from the total
> execution time (calculated again as suggested above by bob).
>
> Alternately I would suggest that the OP first makes sure that his code
> works correctly, and then worry about execution time, thus removing
> the need to stop mid run.

Alternatively, a wall clock would do the job pretty well in this sort of scenario since
+/- 5 minutes is probably a high resolution measurement.

Unless, of course, he charges his time like a lawyer.... :o)

cheers,

paulv

--
Paul van Delst Ride lots.
CIMSS @ NOAA/NCEP/EMC Eddy Merckx
Re: Is there any way to check running speed? [message #52669 is a reply to message #52667] Thu, 15 February 2007 10:52 Go to previous message
Bob[3] is currently offline  Bob[3]
Messages: 60
Registered: December 2006
Member
I think prehaps what the OP is looking for is a way to get the elapsed
time of execution of the code minus any time spent while he stops the
code to verify it is working properly.

Without knowing how the OP "stops" his code for these checks, it's not
really possible to know if it's possible. If he has coded a pause/
resume function then the time spent stopped in that function could be
calculated (as suggested above), and then subtracted from the total
execution time (calculated again as suggested above by bob).

Alternately I would suggest that the OP first makes sure that his code
works correctly, and then worry about execution time, thus removing
the need to stop mid run.

Regards,
Bob.
Re: Is there any way to check running speed? [message #52670 is a reply to message #52669] Thu, 15 February 2007 08:32 Go to previous message
news.qwest.net is currently offline  news.qwest.net
Messages: 137
Registered: September 2005
Senior Member
"DirtyHarry" <kim20026@gmail.com> wrote in message
news:1171555908.413006.152020@l53g2000cwa.googlegroups.com.. .
> Hello, Dr. Fanning,
>
> Sorry for my broken English... (T.T)
>
> If I run a sourcecode whose total running time is 28 hours, sometimes
> I want to stop IDL intentionally to check whether the program is
> running properly. Even in this case, can I have the running time of
> it? If you are still missing something, (Mmmm... Can you speak Korean?
> Just kidding... Sorry T.T) please reply me one more time.

You can put your own statements in to check the time
elapsed between any lines in your code, whether it has stopped
or not.



starttime = systime(1)

dostuff

stoptime = systime(1)

print,'elapsed time in seconds: ',stoptime - starttime


Cheers,
bob
Re: Is there any way to check running speed? [message #52671 is a reply to message #52670] Thu, 15 February 2007 08:11 Go to previous message
kim20026 is currently offline  kim20026
Messages: 54
Registered: November 2006
Member
Hello, Dr. Fanning,

Sorry for my broken English... (T.T)

If I run a sourcecode whose total running time is 28 hours, sometimes
I want to stop IDL intentionally to check whether the program is
running properly. Even in this case, can I have the running time of
it? If you are still missing something, (Mmmm... Can you speak Korean?
Just kidding... Sorry T.T) please reply me one more time.


On Feb 15, 11:55 pm, David Fanning <d...@dfanning.com> wrote:
> DirtyHarry writes:
>> Thank you for your invaluable infomation, Liam. However, in my
>> understanding, it seems that this function doesn't present running
>> time when I have to stop IDL in the middle of running process. What do
>> you think? Do you know how to make IDL print the running time on the
>> screen even stopped in the middle?
>
> I think I am missing something. If it is stopped
> in the middle it is, uh, not running, verdad?
> I've probably just been out of the country too long. :-)
>
> Cheers,
>
> David
>
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming:http://www.dfanning.com/
Re: Is there any way to check running speed? [message #52673 is a reply to message #52671] Thu, 15 February 2007 06:55 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
DirtyHarry writes:

> Thank you for your invaluable infomation, Liam. However, in my
> understanding, it seems that this function doesn't present running
> time when I have to stop IDL in the middle of running process. What do
> you think? Do you know how to make IDL print the running time on the
> screen even stopped in the middle?

I think I am missing something. If it is stopped
in the middle it is, uh, not running, verdad?
I've probably just been out of the country too long. :-)

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Re: Is there any way to check running speed? [message #52674 is a reply to message #52673] Wed, 14 February 2007 16:55 Go to previous message
kim20026 is currently offline  kim20026
Messages: 54
Registered: November 2006
Member
On Feb 15, 4:29 am, liamgum...@gmail.com wrote:
> On Feb 14, 11:51 am, "DirtyHarry" <kim20...@gmail.com> wrote:
>
>> Recently, I made a sequential code to handle MODIS imagery.
>> Performance is OK, but it is very slow now. I need to modify it. As a
>> first step, are there any functions, options, or pre-made source codes
>> to check the speed of each running process? Please let me know.
>> Thanks .
>
> IDL> ? profiler
>
> Cheers,
> Liam.
> Practical IDL Programminghttp://www.gumley.com/

Thank you for your invaluable infomation, Liam. However, in my
understanding, it seems that this function doesn't present running
time when I have to stop IDL in the middle of running process. What do
you think? Do you know how to make IDL print the running time on the
screen even stopped in the middle? Thanks.
Re: Is there any way to check running speed? [message #52675 is a reply to message #52674] Wed, 14 February 2007 11:29 Go to previous message
liamgumley is currently offline  liamgumley
Messages: 74
Registered: June 2005
Member
On Feb 14, 11:51 am, "DirtyHarry" <kim20...@gmail.com> wrote:
> Recently, I made a sequential code to handle MODIS imagery.
> Performance is OK, but it is very slow now. I need to modify it. As a
> first step, are there any functions, options, or pre-made source codes
> to check the speed of each running process? Please let me know.
> Thanks .

IDL> ? profiler

Cheers,
Liam.
Practical IDL Programming
http://www.gumley.com/
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Multiply matrix
Next Topic: contour on map

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 19:25:22 PDT 2025

Total time taken to generate the page: 0.00715 seconds