Re: Rob: Another small feature request for v3.0

new topic     » goto parent     » topic index » view thread      » older message » newer message

Robert Craig wrote:

> I'd like to have that too.
> There was a thread on this a year ago:
> <a
> href="http://www.listfilter.com/cgi-bin/esearch.exu?thread=1&fromMonth=9&fromYear=9&toMonth=B&toYear=9&keywords=%22profile_time+in+win32+euphoria%22">http://www.listfilter.com/cgi-bin/esearch.exu?thread=1&fromMonth=9&fromYear=9&toMonth=B&toYear=9&keywords=%22profile_time+in+win32+euphoria%22</a>
> 
> A clever person could add a form of time profiling to the
> PD source (execute.e). Just record the time() when control
> enters, and the time() when it exits each routine. Then you
> could say how much time was spent inside each routine.
> The difference in time() values would often be zero, but
> it would average out to a nonzero value if the routine was called
> many times. I've done this before for C code, and it worked well.
> 
> Of course this isn't as desirable as having it at the statement level
> in the official interpreter.
> 

I see, but there is no profiling features in the PD-source and only 
trace type 3 is supported. I'm talking about implementing it in the official
interpreter C backend. I believe there is some Win 32 APIs
for measuring time, but I'm not sure about Linux or FreeBSD. There 
are a few machine coded solutions in the archive, but they seem to 
require Windows or DOS plus a Pentium class machine; that probably 
will not cut it though on older 386-486 machines and Linux/FreeBSD.

If you can't figure out a solution for the other three platforms, 
perhaps you can just use time() like you say. It might not be the 
most accurate, but it should be good enough; you can just keep the 
interrupt timer used for DOS Euphoria the way it is.

Perhaps someday you'll figure out how to improve time()'s resolution, 
but if not, thats ok too.

> > Does 'execution-count profiling' work on FreeBSD Euphoria? 
> 
> Yes.
> 
> > In the documentation it says: DOS, Windows, and Linux.
> 
> I'll fix that.
> 

Okay... thanks.

> Regards,
>    Rob Craig
>    Rapid Deployment Software
>    <a href="http://www.RapidEuphoria.com">http://www.RapidEuphoria.com</a>


Regards,
Vincent

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu