grthtrhthjhtyjytjytkergtrhtrjytjerhrfh4:24 29/09/2026B %¬Þëk#Ì|ã@s®ddlZddlZddlZddlZddddgZdZdZdZejZ e Z d Z d d „Z Gd d„dƒZd d e edfdd„Zd d e eedfdd„Zdddœdd„Zedkrªe eƒ¡dS)éNÚTimerÚtimeitÚrepeatÚ default_timerz i@Bézˆ def inner(_it, _timer{init}): {setup} _t0 = _timer() for _i in _it: {stmt} _t1 = _timer() return _t1 - _t0 cCs| ddd|¡S)NÚ ú )Úreplace)ÚsrcÚindent©r ú+/opt/alt/python37/lib64/python3.7/timeit.pyÚreindentOsrc@sLeZdZddedfdd„Zd dd„Zefdd„Zeefd d „Z dd d „Z dS)rÚpassNc Csü||_i}|dkrtƒn|}d}t|tƒrJt|tdƒ|d}t|dƒ}n*t|ƒrl||d<|d7}d}d}ntdƒ‚t|tƒršt||tdƒt|d ƒ}n&t|ƒr¸||d <|d 7}d }ntd ƒ‚t j |||d�} | |_ t| tdƒ} t | ||ƒ|d|_ dS)NÚÚexecréÚ_setupz, _setup=_setupz_setup()z&setup is neither a string nor callableéZ_stmtz , _stmt=_stmtz_stmt()z%stmt is neither a string nor callable)ÚstmtÚsetupÚinitÚinner)ÚtimerÚ_globalsÚ isinstanceÚstrÚcompileÚdummy_src_namerÚcallableÚ ValueErrorÚtemplateÚformatr rr) ÚselfrrrÚglobalsZlocal_nsZ global_nsrZ stmtprefixr Úcoder r r Ú__init__es6       zTimer.__init__cCsJddl}ddl}|jdk r:t|jƒd|j d¡tf|jt<|j|d�dS)Nrr)Úfile)Ú linecacheÚ tracebackr ÚlenÚsplitrÚcacheÚ print_exc)r#r'r(r)r r r r-ˆs   zTimer.print_exccCsBt d|¡}t ¡}t ¡z| ||j¡}Wd|rg�íµ ÷ư>gü©ñÒMbP?gð?)ZnsecZusecZmsecZsecé)z-nz--number)z-sz--setup)z-uz--unitz:Unrecognized unit. Please select nsec, usec, msec, or sec.)r')z-rz--repeat)z-pz --process)z-vz --verbose)z-hz--helpr)Úendcs.d}|dk}t|j||rdnd|ˆd�ƒdS)Nz%{num} loop{s} -> {secs:.{prec}g} secsr7Úsr)ZnumrIZsecsZprec)Úprintr")r0r<ÚmsgÚplural)Ú precisionr r r:?szmain..callbackcsbˆ}|dk rˆ|}n:dd„ˆ ¡Dƒ}|jdd�x|D]\}}||kr:Pq:Wdˆ|||fS)NcSsg|]\}}||f‘qSr r )Ú.0ÚunitÚscaler r r ú Ysz-main..format_time..T)Úreversez%.*g %s)ÚitemsÚsort)ÚdtrOrPZscales)rMÚ time_unitÚunitsr r Ú format_timeSs  zmain..format_timez raw times: %sz, csg|] }|ˆ‘qSr r )rNrU)r0r r rQdszmain..z"%d loop%s, best of %d: %s per looprIrrztThe test results are likely unreliable. The worst time (%s) was more than four times slower than the best time (%s).)ÚsysÚargvÚgetoptÚerrorrJrÚjoinrBÚintr3ÚstderrrDZ process_timeÚ__doc__ÚosÚpathÚinsertÚcurdirrr=r-rÚmapÚminÚmaxÚwarningsÚ warn_explicitÚ UserWarning)ÚargsrCr[ZoptsÚerrrrrrrEÚoÚarar6r:Ú_Z raw_timingsrXZtimingsZbestZworstrhr )r0rMrVrWr Úmainðs¨              rpÚ__main__)N)r/rYrDr.Ú__all__rrArBZ perf_counterrr$rr!rrrrrpr>Úexitr r r r Ú4s*