;ò kó\Gc@sPdZdadZdkZdkZdkZdkZdkZdkZdk l Z e a e a d„Zd„Zd„Zd„Zd efd „ƒYZd efd „ƒYZd „Zee e d„Zd„Zd„Zed„Zd„Ze e e d„Zdded„Zd„Zha ha!eƒeƒeei"ƒe_"dS(s÷ pycallgraph U{http://pycallgraph.slowchop.com/} Copyright Gerald Kaszuba 2007 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA s0.4.1sGerald KaszubaN(s sysconfigcCs5t|d|ƒd}d|dd|dfSdS(Niis%f %f %ff0.5f0.90000000000000002(sfloats total_timescallssvalue(scallss total_timesvalue((sM/mnt/gmirror/ports/devel/py-pycallgraph/work/pycallgraph-0.4.1/pycallgraph.pyscolourize_node(scCs5t|d|ƒd}d|dd|dfSdS(Niis%f %f %ff0.5f0.69999999999999996(sfloats total_timescallssvalue(scallss total_timesvalue((sM/mnt/gmirror/ports/devel/py-pycallgraph/work/pycallgraph-0.4.1/pycallgraph.pyscolourize_edge-scCs¶hdhdd<dd<<dt<dt<dt<d t"%s" %ss}s N( sfrac_calculationsstops stop_tracesretsgraph_attributessitemsscomps comp_attrsappendsattrsvalslocalss func_countsfuncshitss calls_fracstotal_time_fracs total_timessettingsscols_[1]sasattribssjoinsnode_strs call_dictsfr_keysfr_valsto_keysto_vals totla_timesedge(sstopsattribss comp_attrsto_keysvalsfr_keysrets calls_fracs total_timesnode_strscompsfr_valsto_valstotal_time_fracsfuncs totla_timesashitssattrs_[1]sedgesfrac_calculationscol((sM/mnt/gmirror/ports/devel/py-pycallgraph/work/pycallgraph-0.4.1/pycallgraph.pysget_dot$sB      5    " cCst|dƒitƒƒdS(s1Generates a DOT file and writes it into filename.swN(sopensfilenameswritesget_dot(sfilename((sM/mnt/gmirror/ports/devel/py-pycallgraph/work/pycallgraph-0.4.1/pycallgraph.pyssave_dotUscCstdƒ‚dS(s(This has been changed to make_dot_graph.s3make_graph is depricated. Please use make_dot_graphN(sPyCallGraphException(sfilenamesformatstoolsstop((sM/mnt/gmirror/ports/devel/py-pycallgraph/work/pycallgraph-0.4.1/pycallgraph.pys make_graphZsspngsdotc Csê|o tƒntiƒ\}} ti|dƒ}|i t ƒƒ|i ƒt i dƒ}|i|ƒotii|ƒ}ntii|ƒ}dtƒ}z1ti|ƒ}|otdtƒƒ‚nWdti| ƒXdS(sÐCreates a graph using a Graphviz tool that supports the dot language. It will output into a file specified by filename with the format specified. Setting stop to True will stop the current trace. sws\A~s1%(tool)s -T%(format)s -o%(filename)s %(tempname)ss5The command "%(cmd)s" failed with error code %(ret)i.N(sstops stop_tracestempfilesmkstempsfdstempnamesossfdopensfswritesget_dotsclosesrescompilesregex_user_expandsmatchsfilenamespaths expandusers expandvarsslocalsscmdssystemsretsPyCallGraphExceptionsunlink( sfilenamesformatstoolsstopscmdsfsretsfdsregex_user_expandstempname((sM/mnt/gmirror/ports/devel/py-pycallgraph/work/pycallgraph-0.4.1/pycallgraph.pysmake_dot_graph`s$   cs tƒ‰‡‡d†}|SdS(s Simple memoization for functions without keyword arguments. This is useful for mapping code objects to module in this context. inspect.getmodule() requires a number of system calls, which may slow down the tracing considerably. Caching the mapping from code objects (there is *one* code object for each function, regardless of how many simultaneous activations records there are). In this context we can ignore keyword arguments, but a generic memoizer ought to take care of that as well. cs-|ˆjoˆ|Œˆ|          # %   ^ 1