gschlossnagle / yappi

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

Expose saving of results to command line #55

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Run python -m yappi -o script.profile <script name>
2. Get usage message : error no such option : -o 
3.

What is the expected output? What do you see instead?
Usage of the -o option should produce a file (in pstats or callgrind format) of 
the collected statistics for the script.

What version of the product are you using? On what operating system?
0.94. OSX

Please provide any additional information below.

Instead of only allow printing of all statistics from the main function, a 
option should be taken by main to save the results to file.
Perhaps a second option would allow a user to specify the format to save in.

Original issue reported on code.google.com by ddamo...@gmail.com on 25 Feb 2015 at 10:33

GoogleCodeExporter commented 8 years ago
In fact someone already implemented this. See 
https://bitbucket.org/sumerc/yappi/pull-request/12/add-support-for-saving-pstats
-to-file/diff

I will merge this once I find time.

Thanks!

Original comment by sum...@gmail.com on 25 Feb 2015 at 10:42