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

Home » Public Forums » archive » Re: Possible to get name of current procedure from within procedure?
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: Possible to get name of current procedure from within procedure? [message #70818] Tue, 11 May 2010 11:40 Go to next message
robparker23 is currently offline  robparker23
Messages: 10
Registered: March 2009
Junior Member
On 11 May, 14:53, pp <pp.pente...@gmail.com> wrote:
> On May 11, 10:42 am, Rob <robparke...@googlemail.com> wrote:
>
>> I'm not sure if this question even makes sense but what I was
>> wondering is does IDL have any sort of function or variable that can
>> output the name of the procedure/function that is currently being
>> executed?
>
> scope_traceback() gives you the entire call stack.

Thanks. I found an old reference on here to help, calls=stacks which
(although deprecated) does what I want to do.

>> Ultimately this would be something we'd add to all of our modular
>> procedures in order to monitor performance and see how fast each
>> module was running.
>
> This sounds a lot like what the profiler does.

I'm a bit embarrassed to admit that I'd never heard of the profiler
tool before. I've just read up on it on David's site and will
certainly give it a test out. Thanks :-)
Re: Possible to get name of current procedure from within procedure? [message #70822 is a reply to message #70818] Tue, 11 May 2010 06:53 Go to previous messageGo to next message
penteado is currently offline  penteado
Messages: 866
Registered: February 2018
Senior Member
Administrator
On May 11, 10:42 am, Rob <robparke...@googlemail.com> wrote:
> I'm not sure if this question even makes sense but what I was
> wondering is does IDL have any sort of function or variable that can
> output the name of the procedure/function that is currently being
> executed?

scope_traceback() gives you the entire call stack.

>
> What I'd like to do is write a generic bit of code that spawns the
> system time and outputs this to a file, ALONG with the name of the
> procedure where the spawn command was executed.

systime() is probably better than spawning a process just to get the
time.

>
> Ultimately this would be something we'd add to all of our modular
> procedures in order to monitor performance and see how fast each
> module was running.

This sounds a lot like what the profiler does.
Re: Possible to get name of current procedure from within procedure? [message #70909 is a reply to message #70818] Wed, 12 May 2010 02:34 Go to previous message
robparker23 is currently offline  robparker23
Messages: 10
Registered: March 2009
Junior Member
> I'm a bit embarrassed to admit that I'd never heard of the profiler
> tool before. I've just read up on it on David's site and will
> certainly give it a test out. Thanks :-)

Having run the profiler on our code it seems that we're severely over-
using the undefine.pro procedure written by David.

Sorted by time we get:

Module Type Count Only(s) Avg.(s) Time(s) Avg.(s)
UNDEFINE (U) 3026194 14224.68799 0.0047 142470.4584 0.014034

(Which strangely seems to be longer than we actually ran the total
code for)
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: LV Handbags ((http://www.jialiuonline.com
Next Topic: Re: Tips for IDL-istic file transfer...? Please help me.

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

Current Time: Wed Oct 08 13:44:40 PDT 2025

Total time taken to generate the page: 0.00446 seconds