sawsen11 / jrfonseca

Automatically exported from code.google.com/p/jrfonseca
0 stars 0 forks source link

Pull request to make gprof2dot easier to use programatically #108

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Couldn't find a way to properly create a pull request such as in github, so, 
I'm adding an issue for that (which seems pretty weird, but I couldn't find a 
better way).

Link to my repo (in github): https://github.com/fabioz/gprof2dot

Link to commit which addresses this: 
https://github.com/fabioz/gprof2dot/commit/24e2fa6ea03afa03dbbfe2e3a62b387b7db1d
2c1

So, I guess you should be able to add it as a remote there and either merge 
that branch (the only other thing is that I've added the configuration files 
which make it easier to import it into PyDev) or just cherry-pick that commit.

Note that the commit also adds a unit-test to check that the Pstats parser does 
work programatically from an in-memory Pstats object (and that results remain 
the same).

I was wondering if you'd like to add a Travis integration and add some tests 
which check that the output remains the same while the code moves forward (as I 
just added)? -- note: I just noted that Travis only works for Github (although 
it might be a good reason to switch...). It's nice that it'll run tests from 
Python 2.6,2.7,3.2,3.3 to check if things are running properly before 
integrating a branch.

Original issue reported on code.google.com by fabi...@gmail.com on 14 Oct 2014 at 4:56

GoogleCodeExporter commented 9 years ago
Hi Fabio,

> make gprof2dot easier to use programatically

From past experience, I doubt I can afford the burden of maintaining a library 
interface for gprof2dot.  I have very little time to maintain gprof2dot, and I 
suspect the burden/restrain of maintaining a backwards compatible library 
interface would make this even worse.

I'd prefer gprof2dot users used gprof2dot as a program to generate graphs from 
profile data (that happens to be written in Python), as opposed to a Python 
library to do that.

That's why I added the JSON format: for those tools that want generate profile 
data without using arcane plain text format like gprof format, so library 
interface is not needed.

Could you explain why you feel this is needed, over having PyDev spawning a 
separate python process to run gprof2dot?

> I was wondering if you'd like to add a Travis integration [...]

I've been migrating all my repos to github, and I plan to do the same for 
gprof2dot when I can make the time.  I'll look into Travis integration then.

Original comment by Jose.R.F...@gmail.com on 24 Oct 2014 at 1:26

GoogleCodeExporter commented 9 years ago
I understand your point... for me, the strange thing is that I have everything 
in-memory (in pstats format)... dumping to a file and calling an executable 
does work, but it seems strange given that I have everything in hand.

Still, I understand if you don't want to merge that (I can keep it in my own 
fork anyways, so, no harm done there).

Original comment by fabi...@gmail.com on 24 Oct 2014 at 3:25

GoogleCodeExporter commented 9 years ago

Original comment by Jose.R.F...@gmail.com on 13 Mar 2015 at 7:11