PNG  IHDR;IDATxܻn0K )(pA 7LeG{ §㻢|ذaÆ 6lذaÆ 6lذaÆ 6lom$^yذag5bÆ 6lذaÆ 6lذa{ 6lذaÆ `}HFkm,mӪôô! x|'ܢ˟;E:9&ᶒ}{v]n&6 h_tڠ͵-ҫZ;Z$.Pkž)!o>}leQfJTu іچ\X=8Rن4`Vwl>nG^is"ms$ui?wbs[m6K4O.4%/bC%t Mז -lG6mrz2s%9s@-k9=)kB5\+͂Zsٲ Rn~GRC wIcIn7jJhۛNCS|j08yiHKֶۛkɈ+;SzL/F*\Ԕ#"5m2[S=gnaPeғL lذaÆ 6l^ḵaÆ 6lذaÆ 6lذa; _ذaÆ 6lذaÆ 6lذaÆ RIENDB`  aNc@sdZddlZddlZddlZddlZddlZddlZddlZddlm Z ddl m Z ddgZ de fdYZdZd Zd e fd YZd d dZdS(se Middleware that profiles the request and displays profiling information at the bottom of each page. iN(tStringIO(tresponsetProfileMiddlewaretprofile_decoratorcBs/eZdZdZddddZdZRS(s Middleware that profiles all requests. All HTML pages will have profiling information appended to them. The data is isolated to that single request, and does not include data from previous requests. This uses the ``hotshot`` module, which affects performance of the application. It also runs in a single-threaded mode, so it is only usable in development environments. sWclear: both; background-color: #ff9; color: #000; border: 2px solid #000; padding: 5px;sprofile.log.tmpi(cCs.||_tj|_||_||_dS(N(tappt threadingtLocktlockt log_filenametlimit(tselfRt global_confRR ((s7/usr/lib/python2.7/site-packages/paste/debug/profile.pyt__init__&s  c sggdfdfd}jjz+tjj}|jdjddz|j|Wd|j Xdj d}t j |d}|dks|j d rgStjjj}|j|jd d t|jj}t|jj} d jtj|tj| f7gSWdjjXdS( Ncs*j||g|||jS(N(textendtappend(tstatustheaderstexc_info(tbodytcatch_responsetstart_response(s7/usr/lib/python2.7/site-packages/paste/debug/profile.pytreplace_start_response1scsGj}zj|Wdt|drB|jnXdS(Ntclose(RR thasattrR(tapp_iter(RtenvironRR (s7/usr/lib/python2.7/site-packages/paste/debug/profile.pytrun_app5s tURLt PATH_INFOtis content-types text/htmlttimetcallss
%s
%s
(tNoneRtacquirethotshottProfileRtaddinfotgettruncallRtjoinRt header_valuet startswithtstatstloadt strip_dirst sort_statstcapture_outputt print_statsR t print_callerststyletcgitescapetrelease( R RRRtprofRt content_typeR*toutputtoutput_callers((RRRRR Rs7/usr/lib/python2.7/site-packages/paste/debug/profile.pyt__call__.s4    & N(t__name__t __module__t__doc__R1R R R9(((s7/usr/lib/python2.7/site-packages/paste/debug/profile.pyRs   cOsCt}tj}|t_z|||Wd|t_X|jS(N(Rtsyststdouttgetvalue(tfunctargstkwtoutt old_stdout((s7/usr/lib/python2.7/site-packages/paste/debug/profile.pyR.Vs    c s/jdrd}|Sfd}|S(s Profile a single function call. Used around a function, like:: @profile_decorator(options...) def ... All calls to the function will be profiled. The options are all keywords, and are: log_file: The filename to log to (or ``'stdout'`` or ``'stderr'``). Default: stderr. display_limit: Only show the top N items, default: 20. sort_stats: A list of string-attributes to sort on. Default ``('time', 'calls')``. strip_dirs: Strip directories/module names from files? Default True. add_info: If given, this info will be added to the report (for your own tracking). Default: none. log_filename: The temporary filename to log profiling data to. Default; ``./profile_data.log.tmp`` no_profile: If true, then don't actually profile anything. Useful for conditional profiling. t no_profilecSs|S(N((R@((s7/usr/lib/python2.7/site-packages/paste/debug/profile.pyt decoratorscsfd}|S(Ncst||S(N(tDecoratedProfile(RARB(R@toptions(s7/usr/lib/python2.7/site-packages/paste/debug/profile.pyt replacements((R@RI(RH(R@s7/usr/lib/python2.7/site-packages/paste/debug/profile.pyRFs(R%(RHRF((RHs7/usr/lib/python2.7/site-packages/paste/debug/profile.pyRbs " RGcBs8eZejZdZdZdZdZRS(cKs||_||_dS(N(R@RH(R R@RH((s7/usr/lib/python2.7/site-packages/paste/debug/profile.pyR s cOs<|jjz|j|j||SWd|jjXdS(N(RR!tprofileR@R4(R RARB((s7/usr/lib/python2.7/site-packages/paste/debug/profile.pyR9s cOse|j}|jdd}tj|}|jd|j||||jdro|jd|dnd}zKtj}y|j|||} Wnt j }nXtj} Wd|j Xtj j |} tj||jdtr | jn| j|jdd|jd d } t| j| } t| j| }|jd }|dkrt j}nV|dkrt j}n>t|d}|jddd|jdtjd|jd|j||||jd| ||j| |j||dkr@|j n|ra|d|d|dn| S(NRsprofile_data.log.tmps Function Calltadd_infos Extra infoR,R-RRt display_limititlog_filetstderrt-R>tas %s i<s Date: %s s%csFunction call: %s sWall time: %0.2f seconds iii(stimescalls(Nsstderr(ROsstdout(NROsstdoutsstderr(RHR%R"R#R$tformat_functionR RR&R=RRR*R+tostunlinktTrueR,R-R.R/R0RNR>topentwritetstrftime(R R@RARBtopst prof_filenameR5Rt start_timetresulttend_timeR*RLR7R8t output_filetf((s7/usr/lib/python2.7/site-packages/paste/debug/profile.pyRJsX                 cOs_tt|}|jg|jD]\}}d||f^q"d|jdj|fS(Ns%s=%rs%s(%s)s, (tmaptreprR titemsR:R'(R R@RARBtktv((s7/usr/lib/python2.7/site-packages/paste/debug/profile.pyRQs0( R:R;RRRR R9RJRQ(((s7/usr/lib/python2.7/site-packages/paste/debug/profile.pyRGs     1sprofile.log.tmpi(cCs"t|}t|d|d|S(s  Wrap the application in a component that will profile each request. The profiling data is then appended to the output of each page. Note that this serializes all requests (i.e., removing concurrency). Therefore never use this in production. RR (tintR(RR RR ((s7/usr/lib/python2.7/site-packages/paste/debug/profile.pytmake_profile_middlewares (R<R=RRR"t hotshot.statsRR2Rt cStringIORtpasteRt__all__tobjectRR.RRGRe(((s7/usr/lib/python2.7/site-packages/paste/debug/profile.pyts         A ,I