[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] profile: collecting stats for multiple runs
From: |
Alejandro Forero Cuervo |
Subject: |
Re: [Chicken-users] profile: collecting stats for multiple runs |
Date: |
Mon, 28 Feb 2005 18:31:08 -0500 |
User-agent: |
Mutt/1.5.6+20040907i |
Hi, Felix.
> No, this is currently not possible. What you can do is merge several
> PROFILE files. The format is very simple, for every function there
> is a line of this shape:
>
> (<NAME> <NUMBER-OF-CALLS> <NUMBER-OF-MILLISECONDS>)
Would you be willing to accept a patch to modify this? I think it is
far more useful to have the profiler add new information to the
existing file (instead of overwriting it).
I decided to take some time and create a patch implementing this. See
the file attached. Basically, I do the following:
- Open the PROFILE file in append mode (so I won't overwrite previous
info).
- Modify chicken-profile.scm to be smart enough to merge information
from multiple runs, using a hash table.
If a user wants the previous semantics, all he needs to do is rm
PROFILE before running his program (another option would be to add a
--profile-overwrite paramter to Chicken? I would vote against is, at
it adds complexity to Chicken's interface without being too useful).
What do you think?
BTW, I haven't actually got around to testing my changes. They could
be wrong (I'm on a very slow machine, where building Chicken can take
hours; I might try them latter).
Thank you! You are an excellent free software maintainer!
Alejo.
http://bachue.com/alejo
Ps: The structure of sort-by-calls, sort-by-time and sort-by-avg is
very similar. Would you want me to capture it in a procedure and
mayhaps simplify things a bit? Heh, I'm a bit of a perfectionist,
sometimes...
---=( Comunidad de Usuarios de Software Libre en Colombia )=---
---=( http://bachue.com/colibri )=--=( address@hidden )=---
patch
Description: Text document