-í
G°w=c       s2     d  Z  , d k Z - d k Z d k Z d k Z d k Z d k Z 0 d k Z d k Z 1 d k	 Z	 2 d k
 Z d k Z 3 d k l Z 4 d k l Z 6 d e	 i f d „  ƒ  YZ 9 d Z ; d e i f d „  ƒ  YZ O e d	 „ Z z d
 „  Z Ë d „  Z Ö e d j o × e e i d ƒ n d S(   sÄ  Test speed of a ZODB storage

Options:

    -d file    The data file to use as input.
               The default is this script.

    -n n       The number of repititions

    -s module  A module that defines a 'Storage'
               attribute, which is an open storage.
               If not specified, a FileStorage will ne
               used.

    -z         Test compressing data

    -D         Run in debug mode

    -L         Test loads as well as stores by minimizing
               the cache after eachrun

    -M         Output means only

    -C         Run with a persistent client cache

    -U         Run ZEO using a Unix domain socket

    -t n       Number of concurrent threads to run.
N(   s   forker(   s   ConflictErrors   Pc      s   6 t  Z 7 RS(   N(   s   __name__s
   __module__(    (    (    s7   /usr/pkg/lib/python2.2/site-packages/ZEO/tests/speed.pys   P6 s   	s   zeo-speed.fss   ZEOExitc      sP   ; t  Z d  Z < = d „  Z ? d „  Z A d „  Z F d „  Z J d „  Z RS(   s/   Used to exit ZEO.StorageServer when run is donec    s   = > d Sd  S(   Ni    (    (   s   self(    (    s7   /usr/pkg/lib/python2.2/site-packages/ZEO/tests/speed.pys   writable= s   c    s   ? @ d Sd  S(   Ni   (    (   s   self(    (    s7   /usr/pkg/lib/python2.2/site-packages/ZEO/tests/speed.pys   readable? s   c    sT   A B |  i d ƒ } C t o | d j p t ‚ D |  i ƒ  E t i d ƒ d  S(   Ni   s   donei    (   s   selfs   recvs   bufs	   __debug__s   AssertionErrors	   delete_fss   oss   _exit(   s   selfs   buf(    (    s7   /usr/pkg/lib/python2.2/site-packages/ZEO/tests/speed.pys   handle_readA s   c    s,   F G d GHH |  i ƒ  I t i d ƒ d  S(   Ns"   Parent process exited unexpectedlyi    (   s   selfs	   delete_fss   oss   _exit(   s   self(    (    s7   /usr/pkg/lib/python2.2/site-packages/ZEO/tests/speed.pys   handle_closeF s   c    s?   J K t  i t ƒ L t  i t d ƒ M t  i t d ƒ d  S(   Ns   .locks   .tmp(   s   oss   unlinks   fs_name(   s   self(    (    s7   /usr/pkg/lib/python2.2/site-packages/ZEO/tests/speed.pys	   delete_fsJ s   (   s   __name__s
   __module__s   __doc__s   writables   readables   handle_reads   handle_closes	   delete_fs(    (    (    s7   /usr/pkg/lib/python2.2/site-packages/ZEO/tests/speed.pys   ZEOExit; s   c    s€  O P xst  | ƒ DP ]b} Q xVd d d d f DQ ]?} R t i ƒ  } S d }	 U |  i ƒ  } V x:V d o/W yþ X t
 ƒ  i ƒ  Y | i ƒ  }
 Z d | } [ |
 i | ƒ o \ |
 | } n ^ t ƒ  |
 | <} _ x€ t  | ƒ D_ ]o } ` t | t | ƒ t ƒ  ƒ } a | t j	 o b | | ƒ | _ n d | | _ e t | t | ƒ | ƒ qì Wf t
 ƒ  i ƒ  Wn# g t j
 o h |	 d }	 n Xj Pqh Wk | i ƒ  m t i ƒ  | } n | oK o | t j o p d | | | |	 f GHn r d | | | |	 | f GHn t | | i! | |	 f ƒ u t }
 } } } v | o$ w t i# d	 ƒ x | i$ d	 ƒ n q2 Wq Wd  S(
   Ni   i
   id   iè  i    s   s%ss   %s	%s	%.4f	%ds   %s	%s	%.4f	%d	%di   (%   s   ranges   nreps   js   rs   times   ts	   conflictss   dbs   opens   jars   get_transactions   begins   roots   rts   keys   has_keys   ps   Ps   is   getattrs   strs   vs   compresss   Nones   datas   ds   setattrs   commits   ConflictErrors   closes   detaileds   threadnos   resultss   appends   minimizes   sleeps   cacheMinimize(   s   dbs   resultss   nreps   compresss   datas   detaileds   minimizes   threadnos   keys	   conflictss   rts   ds   ps   is   js   jars   rs   ts   v(    (    s7   /usr/pkg/lib/python2.2/site-packages/ZEO/tests/speed.pys   workO sL    	 		 
 		

c    s¸  z { t  i  |  d ƒ \ } }  | t } } t } ~ t i d }  d } € d }  d } ‚ t } ƒ d } „ d } … xw| D… ]l\ } } † | d j o † t | ƒ } n>‡ | d j o ‡ | } n!ˆ | d j o ˆ | } n‰ | d	 j o Š d  k } ‹ | i } nØ Œ | d
 j o  d } n» Ž | d j o  d } nž  | d j o0 ‘ ’ d t i d <“ d t i d <” d a n^ • | d j o – d } nA — | d j o ˜ d } n$ ™ | d j o š t | ƒ } n q€ Wœ t }  | o: ž t | t ƒ  t ƒ  d f ƒ } Ÿ | i }   t } n. ¢ t i d £ t d f d | ƒ\ } } } ¥ t | ƒ i  ƒ  } ¦ t! i" | ¨ d d © d d ƒ} « d GH¬ h  g  d <g  d <g  d <g  d  <} ­ | d j oÄ ® d  k% }
 ¯ g  } ° x] t' | ƒ D° ]L } ± |
 i) d! t* ² d" | | | | | | | | f ƒ } ´ | i, | ƒ qWµ x | Dµ ] } ¶ | i- ƒ  qmW· x | D· ] } ¸ | i. ƒ  q‘Wn  » t* | | | | | | | ƒ ½ | t j	 o$ ¾ | i/ ƒ  ¿ t i0 | d ƒ n Á | o Â d# d$ GHn Ã d% GHÄ xŠ d d d d  f DÄ ]s }	 Å g  } Æ x+ | |	 DÆ ] \ } } Ç | i, | ƒ qZWÈ t5 | ƒ } É d& |	 | t6 | ƒ t7 | ƒ f GHq:Wd  S('   Ns   zd:n:Ds:LMt:Ui    i   i   s   AF_INETs   -ns   -ds   -ss   -zs   -Ls   -Ms   -Ds    s   STUPID_LOG_FILEs   -999s   STUPID_LOG_SEVERITYs   -Cs   speeds   -Us   AF_UNIXs   -ts   __doc__s   FileStorages   domains
   cache_sizei   s   cache_deactivate_afterip  s   Beginning work...i
   id   iè  s   targets   argss   -i   s   num	mean	min	maxs   %d	%.4f	%.4f	%.4f(8   s   getopts   argss   optss   Nones   ss   compresss   syss   argvs   datas   nreps   minimizes   detaileds   caches   domains   threadss   os   vs   ints   zlibs   oss   environs   debugs   zeo_pipes
   __import__s   globalss   Storages   servers   forkers	   start_zeos   fs_names   pids   opens   reads   ZODBs   DBs   dbs   resultss	   threadings   ls   ranges   is   Threads   works   ts   appends   starts   joins   closes   waitpids   rs   timess   times   confs   means   mins   max(   s   argss   detaileds   domains   pids   resultss   confs   servers   caches   ss   rs	   threadings   dbs   compresss   nreps   threadss   datas   is   zlibs   vs   ls   os   timess   minimizes   ts   times   zeo_pipes   opts(    (    s7   /usr/pkg/lib/python2.2/site-packages/ZEO/tests/speed.pys   mainz sœ   								
    	
!!	-	 	'
 	
 	
 		 c    sE   Ë Ì d } Í x |  DÍ ] } Î | | } q WÏ | t |  ƒ Sd  S(   Ni    (   s   tots   ls   vs   len(   s   ls   tots   v(    (    s7   /usr/pkg/lib/python2.2/site-packages/ZEO/tests/speed.pys   meanË s
   	
 	s   __main__i   (   s   usages   asyncores   syss   oss   getopts   strings   times   ZODBs   ZODB.FileStorages   Persistences   ZEO.ClientStorages   ZEOs   ZEO.StorageServers	   ZEO.testss   forkers   ZODB.POSExceptions   ConflictErrors
   Persistents   Ps   fs_names   file_dispatchers   ZEOExits   Nones   works   mains   means   __name__s   argv(   s   fs_names   asyncores   strings   Ps   ZEOExits   works   ZEOs   forkers   syss   ConflictErrors   ZODBs   times   usages   getopts   mains   oss   Persistences   mean(    (    s7   /usr/pkg/lib/python2.2/site-packages/ZEO/tests/speed.pys   ? s   0	+Q