[PATCH] Improve profiling doc and make the data easier to visualise
Ian Clatworthy
ian.clatworthy at internode.on.net
Thu May 31 06:16:17 BST 2007
Robert Collins wrote:
>
> A few things..
>
> I'm not convinced that doing it magically is the right thing to do...
> but if we do, surely the endswith test should be for '.txt' not 'txt'
> etc?
>
> I think the logic for what to add to the output file should not be in
> the UI layer; that should be a helper function or something in the
> lsprof module so that it can be tested directly and reused.
>
> Its a shame about needing to do isinstance, that would seem to be a
> defect in the lsprof internals? Perhaps a note in the code about what is
> being achieved by the isinstance calls ? e.g.
>
> # where isinstance(code, str) is used it is to determine if the code
> # object is actually a code object and thus has a filename and other
> # details we can print, or if its just a string and as such we can only
> # print its str() representation.
>
> I think we are trying to split HACKING into more smaller pieces. Perhaps
> you could add this to the developers index and give it its own file?
>
> +1 with these points addressed (either by telling me I'm wrong, or
> changing things :).
>
> -Rob
New patch attached. I do feel that conversion to user-friendly output
formats is a good thing. Running the profiler then looking at the data
immediately is the common case. One ought to be able to do that without
needing to run some helper function IMO. As requested, I've made the
triggering for those conversions more explicit though with extensions of
.txt and .callgrind being required to make it happen.
All other changes requested have been made.
Ian C.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: profiling-easier-2.patch
Type: text/x-patch
Size: 13615 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20070531/4b55c9b2/attachment-0001.bin
More information about the bazaar
mailing list