Commit ba133293 authored by Jim Fulton's avatar Jim Fulton

Added cache size to debug info.

parent cfccb5da
...@@ -84,8 +84,8 @@ ...@@ -84,8 +84,8 @@
############################################################################## ##############################################################################
"""Database objects """Database objects
$Id: DB.py,v 1.15 1999/08/26 20:24:12 jim Exp $""" $Id: DB.py,v 1.16 1999/08/27 20:38:03 jim Exp $"""
__version__='$Revision: 1.15 $'[11:-2] __version__='$Revision: 1.16 $'[11:-2]
import cPickle, cStringIO, sys, POSException import cPickle, cStringIO, sys, POSException
from Connection import Connection from Connection import Connection
...@@ -497,9 +497,15 @@ class DB: ...@@ -497,9 +497,15 @@ class DB:
for version, (pool, allocated, lock) in pools.items(): for version, (pool, allocated, lock) in pools.items():
for c in allocated: for c in allocated:
o=c._opened o=c._opened
d=c._debug_info
if d:
if len(d)==1: d=d[0]
else: d=''
d="%s (%s)" % (d, len(c._cache))
r.append({ r.append({
'opened': o and ("%s (%.2fs)" % (ctime(o), t-o)), 'opened': o and ("%s (%.2fs)" % (ctime(o), t-o)),
'info': c._debug_info, 'info': d,
'version': version, 'version': version,
}) })
return r return r
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment