SVN: ZODB/branches/jim-simulation/src/ZEO/scripts/cache_trace_simulation.py Add interval reporting. The interval needs to be configurable.

Jim Fulton <[email protected]>
Newsgroups gmane.comp.python.zope.zodb.cvs
Message-ID <20100601183930.75AE0941F0__40495.9572981626$1275417574$gmane$org@cvs.zope.org>
Log message for revision 112891:
  Add interval reporting. The interval needs to be configurable.
  

Changed:
  U   ZODB/branches/jim-simulation/src/ZEO/scripts/cache_trace_simulation.py

-=-
Modified: ZODB/branches/jim-simulation/src/ZEO/scripts/cache_trace_simulation.py
===================================================================
--- ZODB/branches/jim-simulation/src/ZEO/scripts/cache_trace_simulation.py	2010-06-01 17:51:54 UTC (rev 112890)
+++ ZODB/branches/jim-simulation/src/ZEO/scripts/cache_trace_simulation.py	2010-06-01 18:39:30 UTC (rev 112891)
@@ -127,6 +127,12 @@
             # and try again.  Why 8?  Lost in the mist of history.
             f.seek(f.tell() - FMT_SIZE + 8)
             continue
+
+
+        if (sim.ts0 is not None) and (ts - sim.ts0 > 900):
+            sim.report()
+            sim.restart()
+
         oid = f_read(oidlen)
         if len(oid) < oidlen:
             break
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.