vkondrat / yappi

Automatically exported from code.google.com/p/yappi
MIT License
0 stars 0 forks source link

rewrite get_stats in python #30

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What do you think about rewriting get_stats in python? This is not 
performance-critical function and I think the python implementation will be 
much simpler.

Original issue reported on code.google.com by kmik...@gmail.com on 6 Jan 2012 at 7:45

GoogleCodeExporter commented 8 years ago
Well, in fact this is a pretty good idea and this is the first thing I would do 
if I have some time:). Well if you have some time and motivation to do this, I 
can happily accept the changes.(I think you have already forked the rep., if 
you want I can also open a branch for this.) 

I have some suggestions and opinions about the issue that we can discuss on:

- Any kind of string formatting will be done in Python level, all of the 
current functionality will be removed from yappi.c.
- There should also be a function for enumerating the thread results like 
enum_stats() like: enum_context_results
- The only functions available for getting profiler results will be enum_stat() 
and enum_context_stats().
- All of the enum_XXX() functions will return a dictionary of the statistic 
entry instead of a tuple. I have implemented this as a tuple for simplicity, 
but this happens to be a wrong idea, dict is simply more readable.
- No reason to say but functionality must be tested. (we can work together at 
this stage and decide when to release)

If you have any issues/questions or design decisions to discuss, I will try my 
best to help.

Thank you,

Original comment by sum...@gmail.com on 7 Jan 2012 at 6:13

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Also see: issue27 and issue28. Both are related with this change.

Original comment by sum...@gmail.com on 7 Jan 2012 at 6:22

GoogleCodeExporter commented 8 years ago
Just for information: I have started implementing this.

Original comment by sum...@gmail.com on 10 Jan 2012 at 11:48

GoogleCodeExporter commented 8 years ago
Hi,

What do you think about the latest change in head? I borrowed some ideas from 
your code(django-profiling-dashboard), your usage of yappi.

Do you have any comments/improvements?

Original comment by sum...@gmail.com on 11 Jan 2012 at 10:03

GoogleCodeExporter commented 8 years ago
done in v0.62.

Original comment by sum...@gmail.com on 6 Mar 2012 at 6:25