mς &U²Ic@s3dZdkZdklZdfd„ƒYZdS(s6High-perfomance logging profiler, mostly written in C.N(s ProfilerErrortProfilecBs_tZddd„Zd„Zd„Zd„Zd„Zd„Zd „Zd „Z d „Z RS( NiicCsŸ|odpd|_|o |odpd|_ti||i|iƒ|_}|it jo4|i |_ |i |_ |i |_ |i |_ ndS(Nii(t lineeventstselft linetimingst_hotshottprofilertlogfnt_proftpt __class__Rtclosetstarttstoptaddinfo(RRRRR((t-/data/zmath/lib/python2.4/hotshot/__init__.pyt__init__ s"   cCs|iiƒdS(s-Close the logfile and terminate the profiler.N(RRR (R((RR scCs |iiƒS(s6Return the file descriptor of the profiler's log file.N(RRtfileno(R((RRscCs|iiƒdS(sStart the profiler.N(RRR (R((RR scCs|iiƒdS(sStop the profiler.N(RRR (R((RR $scCs|ii||ƒdS(s3Add an arbitrary labelled value to the profile log.N(RRR tkeytvalue(RRR((RR (scCs%dk}|i}|i|||ƒS(s»Profile an exec-compatible string in the script environment. The globals from the __main__ module are used as both the globals and locals for the script. N(t__main__t__dict__tdictRtrunctxtcmd(RRRR((Rtrun/s  cCs,t|ddƒ}|ii|||ƒ|S(s‡Evaluate an exec-compatible string in a specific environment. The string is compiled before profiling begins. stexecN(tcompileRtcodeRRtruncodetglobalstlocals(RRRRR((RR:scOs|ii|||ƒS(sProfile a single call of a callable. Additional positional and keyword arguments may be passed along; the result of the call is returned, and exceptions are allowed to propogate cleanly, while ensuring that profiling is disabled on the way out. N(RRtruncalltfunctargstkw(RR R!R"((RRDs( t__name__t __module__RR RR R R RRR(((RRs      (t__doc__Rt ProfilerErrorR(RRR&((Rt?s