Ñò 9ÝoLc @sôddkZddkZddkZddkZddkZddklZddkZddkZ ddk Z e a dZ de Zdefd„ƒYZdad„Zdd„Zd eifd „ƒYZd eifd „ƒYZd efd„ƒYZdefd„ƒYZdefd„ƒYZdefd„ƒYZdefd„ƒYZdefd„ƒYZdefd„ƒYZedjo`dei joBe!a gZ"ei D]Z#e#djp e"e#q´q´["e_ nei$ƒndS(iÿÿÿÿN(tpystoneiègà?t DurationErrorcBseZRS((t__name__t __module__(((s?/usr/lib64/python2.6/site-packages/Cheetah/Tests/Performance.pyRscCs$tptidtiƒantS(Ntloops(t_pystone_calibration_markRtpystonestLOOPS(((s?/usr/lib64/python2.6/site-packages/Cheetah/Tests/Performance.pyt_pystone_calibrationscsJtˆtƒptˆƒ‰nˆp tƒ‰n‡‡fd†}|S(s° Performance test decorator based off the 'timedtest' decorator found in this Active State recipe: http://code.activestate.com/recipes/440700/ cs‡‡‡fd†}|S(Ncs°tiƒ}zˆ||ŽSWdtiƒ|}|djo d}nˆdˆd}||}todˆi|fGHn,|ˆtjotd|ˆfƒ‚nXdS(NiisThe test "%s" took: %s pystoness-Test too long (%.2f Ps, need at most %.2f Ps)(ttimetDEBUGt func_namet TOLERANCER(targstkwt start_timet total_timetpystone_total_timet pystone_rate(tfunctiontcurrent_pystonetmax_num_pystones(s?/usr/lib64/python2.6/site-packages/Cheetah/Tests/Performance.pytwrapper.s      ((RR(RR(Rs?/usr/lib64/python2.6/site-packages/Cheetah/Tests/Performance.pyt_test-s(t isinstancetfloatR(RRR((RRs?/usr/lib64/python2.6/site-packages/Cheetah/Tests/Performance.pytperftest!s  tDynamicTemplatePerformanceTestcBs)eZdZd„ZedƒeƒZRS(i cCs9d}x,t|iƒD]}tiii|ƒ}qWdS(NsU #def foo(arg1, arg2) #pass #end def (trangeRtCheetahtTemplatetcompile(tselfttemplatetitklass((s?/usr/lib64/python2.6/site-packages/Cheetah/Tests/Performance.pyttest_BasicDynamicJs i°(RRRR$R(((s?/usr/lib64/python2.6/site-packages/Cheetah/Tests/Performance.pyRGs tPerformanceTestcBs#eZdZeZeZd„ZRS(i †cCs tid|iiƒ|_|iiƒx>t|iƒD]-}t|dƒot |_ |i ƒq9q9W|ii ƒ|ii ƒ|i oUd|ii|ifGHtiid|iiƒ}|iddƒ|idƒn|iptid|iiƒndS(Ns%s.proftperformanceSamples>>> %s (%d iterations) R tcallsi2(thotshottProfilet __class__RtproftstartRt iterationsthasattrtTruetdisplayR&tstoptclosetstatstloadt sort_statst print_statstsavetostunlink(R R"R3((s?/usr/lib64/python2.6/site-packages/Cheetah/Tests/Performance.pytrunTestZs"        (RRR-tFalseR0R7R:(((s?/usr/lib64/python2.6/site-packages/Cheetah/Tests/Performance.pyR%UstDynamicMethodCompilationTestcBseZd„ZRS(cCs:d}tiii|dtƒ}|ƒ}|iƒ}dS(Ns³ #import sys #import os #def testMethod() #set foo = [1, 2, 3, 4] #return $foo[0] #end def tkeepRefToGeneratedCode(RRRR;t testMethod(R R!tvalue((s?/usr/lib64/python2.6/site-packages/Cheetah/Tests/Performance.pyR&os   (RRR&(((s?/usr/lib64/python2.6/site-packages/Cheetah/Tests/Performance.pyR<nstBunchOfWriteCallscBseZdZd„ZRS(iècCs=d}tiii|dtƒ}|ƒ}|iƒ}~dS(Ns‚ #import sys #import os #for i in range(1000) $i #end for R=(RRRR;trespond(R R!R?((s?/usr/lib64/python2.6/site-packages/Cheetah/Tests/Performance.pyR&€s    (RRR-R&(((s?/usr/lib64/python2.6/site-packages/Cheetah/Tests/Performance.pyR@~stDynamicSimpleCompilationTestcBseZd„ZRS(cCs:d}tiii|dtƒ}|ƒ}t|ƒ}dS(Ns® #import sys #import os #set foo = [1,2,3,4] Well hello there! This is basic. Here's an array too: $foo R=(RRRR;tunicode(R R!((s?/usr/lib64/python2.6/site-packages/Cheetah/Tests/Performance.pyR&s   (RRR&(((s?/usr/lib64/python2.6/site-packages/Cheetah/Tests/Performance.pyRBŽst FilterTestcBs eZdZd„Zd„ZRS(cCsDtt|ƒiƒd}tiii|dtƒ}|ƒ|_dS(Nsz #import sys #import os #set foo = [1, 2, 3, 4] $foo, $foo, $foo R=(tsuperRDtsetUpRRRR;R!(R R!((s?/usr/lib64/python2.6/site-packages/Cheetah/Tests/Performance.pyRF¡s  cCst|iƒ}dS(N(RCR!(R R?((s?/usr/lib64/python2.6/site-packages/Cheetah/Tests/Performance.pyR&®sN(RRtNoneR!RFR&(((s?/usr/lib64/python2.6/site-packages/Cheetah/Tests/Performance.pyRDŸs tLongCompileTestcBs eZdZd„Zd„ZRS(s7 Test the compilation on a sufficiently large template cCstiii|dtƒS(NR=(RRRR;(R R!((s?/usr/lib64/python2.6/site-packages/Cheetah/Tests/Performance.pyR´scCsd}|i|ƒS(Nsá #import sys #import Cheetah.Template #extends Cheetah.Template.Template #def header()

This is my header

#end def #def footer() #return "Huzzah" #end def #def scripts() #pass #end def #def respond() ${title} $scripts() $header() #for $i in $range(10) This is just some stupid page!
#end for
$footer() #end def (R(R R!((s?/usr/lib64/python2.6/site-packages/Cheetah/Tests/Performance.pyR&·s((RRt__doc__RR&(((s?/usr/lib64/python2.6/site-packages/Cheetah/Tests/Performance.pyRH²s t LongCompile_CompilerSettingsTestcBseZd„ZRS(cCs-tiii|dtdhtd6td6ƒS(NR=tcompilerSettingstuseStackFramestuseAutocalling(RRRR;R/(R R!((s?/usr/lib64/python2.6/site-packages/Cheetah/Tests/Performance.pyRãs(RRR(((s?/usr/lib64/python2.6/site-packages/Cheetah/Tests/Performance.pyRJâstLongCompileAndRuncBseZd„ZRS(cCs>tt|ƒiƒ}|dhdd6gƒ}|iƒ}dS(Nt searchListtfoottitle(RERNR&RA(R R!((s?/usr/lib64/python2.6/site-packages/Cheetah/Tests/Performance.pyR&ès(RRR&(((s?/usr/lib64/python2.6/site-packages/Cheetah/Tests/Performance.pyRNçst__main__s--debug(%R(t hotshot.statsR8tsystunittestttestRR tCheetah.NameMapperRtCheetah.TemplateR;R tkPSR tAssertionErrorRRGRRRtTestCaseRR%R<R@RBRDRHRJRNRtargvR/t_[1]targtmain(((s?/usr/lib64/python2.6/site-packages/Cheetah/Tests/Performance.pyts:           &0 <