-ν
\&=c       s  d  Z  d k Z d k Z d k Z d k Z d k Z d k Z d k l Z d k	 Z	 d k
 Z
 d k Z d k Z d k Z d Z d Z d Z d Z d Z d Z d e i f d	     YZ d
 e i f d     YZ d   Z d   Z e d  Z d   Z e d  Z e d j o e   n d S(   s-   A multi-client test of the ZEO storage serverN(   s   forkeri   i   id   f0.10000000000000001s    s   Recordc      s    t  Z e e d  Z d   Z RS(   Nc    s   | |  _  t |  _ t |  _ d  S(   N(   s   clients   selfs   Nones   values   next(   s   selfs   clients   value(    (    s7   /usr/pkg/lib/python2.2/site-packages/ZEO/tests/multi.pys   __init__$ s    		c    s   | |  _  d  S(   N(   s   nexts   self(   s   selfs   next(    (    s7   /usr/pkg/lib/python2.2/site-packages/ZEO/tests/multi.pys   set_next) s    (   s   __name__s
   __module__s   Nones   __init__s   set_next(    (    (    s7   /usr/pkg/lib/python2.2/site-packages/ZEO/tests/multi.pys   Record# s   s   Statsc      s   t  Z d   Z d   Z RS(   Nc    s   t  i    |  _ t |  _ d  S(   N(   s   times   selfs   begins   Nones   end(   s   self(    (    s7   /usr/pkg/lib/python2.2/site-packages/ZEO/tests/multi.pys   __init__- s    c    s   t  i    |  _ d  S(   N(   s   times   selfs   end(   s   self(    (    s7   /usr/pkg/lib/python2.2/site-packages/ZEO/tests/multi.pys   done1 s    (   s   __name__s
   __module__s   __init__s   done(    (    (    s7   /usr/pkg/lib/python2.2/site-packages/ZEO/tests/multi.pys   Stats, s   	c     sx   t  i   } t o d G| GHn t i i |  } t i |  } | i	   i
   }  t i   |  d <t   i   | Sd  S(   Ns   FileStorage path:s   multi(   s   tempfiles   mktemps   paths   VERBOSEs   ZODBs   FileStorages   fss   DBs   dbs   opens   roots   PersistentMappings   get_transactions   commit(   s   roots   paths   dbs   fs(    (    s7   /usr/pkg/lib/python2.2/site-packages/ZEO/tests/multi.pys   init_storage4 s    c    s/   t    } t i | |   \ } } | | f Sd  S(   N(   s   init_storages   storages   forkers   start_zeo_servers   addrs   pids   exit(   s   addrs   exits   storages   pid(    (    s7   /usr/pkg/lib/python2.2/site-packages/ZEO/tests/multi.pys   start_serverA s    	c    s€   t  i   } | d j o zn d  k } t o d Gt  i   GHn | i i |  d t	 } | t j o t |  n | |  | i   Wd  t  i d  Xn | Sd  S(   Ni    s   Client process started:s   client(   s   oss   forks   pids   ZEO.ClientStorages   ZEOs   VERBOSEs   getpids   ClientStorages   addrs   CLIENT_CACHEs   clis   client_funcs   Nones   runs   closes   _exit(   s   addrs   client_funcs   pids   ZEOs   cli(    (    s7   /usr/pkg/lib/python2.2/site-packages/ZEO/tests/multi.pys   start_clientF s    	
 c    sρ  t  |  d  o' x  |  i   o t i t  q Wn t i   } d G| G|  GHt	 i
 |   } | i   i   } xe d o] y" t   } | | <t   i   Wn3 t	 i i j
 o! t   i   t i t  n XPqt W| d }	 t }
 d } xΫ | t j  oΝ yL t |	  } t | |  } |	 | <|
 o |
 i |  n t   i   Wn5 t	 i i j
 o# } t   i   t i t  nG X| d } t! o | d j  p | d d j o d | | t f GHn qς W| i"   t   i   d	 G| GHd  S(
   Ns   is_connecteds   Client process connected:i   s   multii    i   i
   s   Client %s: %s of %ss   Client completed:(#   s   hasattrs   storages   is_connecteds   times   sleeps   CONNECT_DELAYs   oss   getpids   pids   ZODBs   DBs   dbs   opens   roots   Statss   ss   get_transactions   commits   POSExceptions   ConflictErrors   aborts   CONFLICT_DELAYs   dicts   Nones   prevs   is   RECORDS_PER_CLIENTs   lens   sizes   Records   rs   set_nexts   errs   VERBOSEs   done(   s   storages   dbs   pids   rs   sizes   errs   is   roots   ss   dicts   prev(    (    s7   /usr/pkg/lib/python2.2/site-packages/ZEO/tests/multi.pys   runX sJ      
 
%
c    sC  t  o d Gt i   GHn t i   }
 t i   } t |
  \ } }	 t i   } g  } x* t t  D] } | i t |
 |    qc Wxl | D]d } y. t  o d t |  GHn t i | d  Wn- t i j
 o } d t |  | f GHn Xq Wt i   } |	 i   t i | d  d G| | GHd G| | GHd G| | GHd  S(   Ns   Main process:s   waitpid(%s)i    s   waitpid(%s) failed: %ss   Total time:s   Server start times   Client time:(   s   VERBOSEs   oss   getpids   tempfiles   mktemps   addrs   times   t0s   start_servers
   server_pids   servers   t1s   pidss   ranges   CLIENTSs   is   appends   start_clients   client_funcs   pids   reprs   waitpids   errors   errs   t2s   close(   s   client_funcs   errs   t2s   pids   t0s   t1s   is
   server_pids   pidss   servers   addr(    (    s7   /usr/pkg/lib/python2.2/site-packages/ZEO/tests/multi.pys   main s2       
s   __main__(   s   __doc__s   ZODBs   ZODB.DBs   ZODB.FileStorages   ZODB.POSExceptions   Persistences   PersistentMappings	   ZEO.testss   forkers   asyncores   oss   tempfiles   times   typess   VERBOSEs   CLIENTSs   RECORDS_PER_CLIENTs   CONFLICT_DELAYs   CONNECT_DELAYs   CLIENT_CACHEs
   Persistents   Records   Statss   init_storages   start_servers   Nones   start_clients   runs   mains   __name__(   s   CLIENT_CACHEs   asyncores   RECORDS_PER_CLIENTs   Statss   CLIENTSs   CONFLICT_DELAYs   forkers   Records   ZODBs   PersistentMappings   runs   Persistences   VERBOSEs   start_servers   tempfiles   start_clients   CONNECT_DELAYs   typess   times   init_storages   mains   os(    (    s7   /usr/pkg/lib/python2.2/site-packages/ZEO/tests/multi.pys   ? s0   $											(