octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Profiler: Implement output function 'profshow'


From: Daniel Kraft
Subject: Re: Profiler: Implement output function 'profshow'
Date: Sun, 24 Jul 2011 21:25:13 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20110624 Thunderbird/5.0

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 07/23/11 21:31, Jordi GutiƩrrez Hermoso wrote:
> On 20 July 2011 11:40, Daniel Kraft <address@hidden> wrote:
>> this is a follow-up patch on my last profiler changeset (which 
>> implemented profile.m). This adds a function 'profshow', which can 
>> be used to print a simple flat-profile table. As far as I
>> understood the thread about Matlab output, there's no equivalent 
>> function(ality) there, so I hope my implementation is useful and 
>> looks ok. But of course, comments welcome!
> 
> I'm going to be talking to Matlab users and see what they think of 
> this implementation, but it's looking good to me.

Thanks!  If you (or anyone else) have suggestions in the future, just
tell me and I'll try to integrate them.  The current implementation is
what I considered as a minimal useful one and most likely what I would
expect a flat profile to look like myself.  The same is of course true
if you find a discrepancy between my recursive flag and how Matlab
treats it.

>> * Should I also print the 'IsRecursive' flag in the table? While
>> it does not really fit into a flat profile table (IMHO), this would
>> be a good place to show it.
> 
> I think it is too, go for it.

Alright, then this will be the next (small) project.  Shouldn't take
long, of course.

>> * In general for the profiler, should I add tests?  I'm much in 
>> favour of testing as much as possible, but I'm not sure how to do 
>> this best. Maybe by some hierarchy of test-functions which call 
>> sleep at some points?  And then compare the profiler output with 
>> expected times up to some "epsilon"?
> 
> I don't think meaningful tests can be made other checking that it 
> errors out correctly when you give it the wrong output arguments. 
> Demos as you've been making are good. You can't predict what the
> times will be as (1) this can in the end depend on a lot of Octave
> code that is not part of the profiling code, so you would be testing
> a lot more than just the profiler (2) depends on hardware.

Hm, I think that if we just use test functions without calling a lot of
Octave intrinsics and 'sleep' to take up time, it should (possibly) be
doable to get more or less reliable times (after some rounding).  But I
also think that this may be fragile and so it may be better to just not
try adding tests.

Regarding the next projects (as per your other message):  I thought that
a first kind of UI would be most useful -- but this is now already
implemented with profshow.  So my next steps (after the recursive flag
printing, which is trivial) will be to tackle operators and anonymous
functions and hope that I'll have more luck this time. ;)

BTW, nice to know that Matlab doesn't do operators -- maybe we can
really be first for them! :)

Yours,
Daniel

- -- 
OpenPGP: 3BA2 3DDB 7758 F010 BDAB 0DCF 527E 79BA A3B5 3998
or use https://safesend.kraftware.de/
- --
Done:  Arc-Bar-Cav-Kni-Ran-Rog-Sam-Tou-Val-Wiz
To go: Hea-Mon-Pri
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIcBAEBAgAGBQJOLHGYAAoJEFJ+ebqjtTmY7wAP/Ajt2epqVPBADxe5nI/OrXr0
F6SWqA42ffKr1vyQ0qFcyVAF1zoaFNDnrHo1WlUBvV0N9IGJeqjfh6iISDvybkFP
maY9BIJ8obNkJKCW1wrfz1ITriufheDf7dw0grEMyl8c8orWVdMgVpZKmWwkrtDV
lg5Fsza6MQ7X8gBZCMhtKrxxYorGrhUcj9Ld5j0wsvaybTV0xUdwnZOQLKXwXGko
v5usN9oue5drMkrA5y1GVf4FPDt5h4k+JRKWrbdaWaiEyRfPU0/FdQBIszgw6JW6
RoH2pULFLt/1nd/+Xoyu6J9IJfNdbAUxiFbqIdSn8LEUU6Vv+vuy3wQDlVY16vwL
yF5Cgv6Z0iedlpKvzShSJkuSW0oh/DVwvkPXHnZEmEIH77G2/F3OC619qzbkBAws
Xn118KaC2XGGUfqSu6wJsUKZ0EM+nh1c2LgnVZ1+E6ZJxKveEzAfXVgZ8+6h6mWE
OXWe5/SNfLK2SEM2k5MDWqkj3XebUkCqb5/GxoKbmz7lwEsx2hQAC/U060dpoJdK
WUHV7Zu9OEgxPgtLjHTD9vQ1XjkPdDbks4/Az8K7rMafODfesvi+IVrMO0hHhi+d
tR0YJSoHtZnRvbKOL7ABuc1VkXQYBgQEbQR+Z82CgbLGe0F6UA8cC3CX+raKNtn9
Q2qI1iHfLIg1vyvoW47K
=QFYB
-----END PGP SIGNATURE-----


reply via email to

[Prev in Thread] Current Thread [Next in Thread]