#307 Support for pstat files generated by hotshot

open
5
2009-03-23
2009-03-23
Anonymous
No

If pstat file generated by hotspot profiler epydoc will fail with error "Bad marshall data"

Error caused by explicit openning by psats.Stats( ... )

epydoc.cli, line 771:
profile_stats = pstats.Stats(options.pstat_files[0])
Documentation pstats documentation provides information:

"""The file selected by the above constructor must have been created by the corresponding version of profile or cProfile. To be specific, there is no file compatibility guaranteed with future versions of this profiler, and there is no compatibility with files produced by other profilers.
"""

So, it's not an unexpected behaviour.

I am using a patch, which tries to re-open file using hotshot.stats.load function if pstats.Stats fails, but I didn't attach it because I didn't dig deeply in a problem and I am not sure that it is a correct approach. For example, it might be better idea to define explicitly pstat's version.

Discussion


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks