[Zodb-checkins] CVS: StandaloneZODB/bsddb3Storage/bsddb3Storage - BerkeleyBase.py:1.16.2.1
Barry Warsaw
barry@wooz.org
Mon, 12 Aug 2002 18:57:52 -0400
Update of /cvs-repository/StandaloneZODB/bsddb3Storage/bsddb3Storage
In directory cvs.zope.org:/tmp/cvs-serv393
Modified Files:
Tag: bsddb3Storage-picklelog-branch
BerkeleyBase.py
Log Message:
getSize(): Port from the trunk.
=== StandaloneZODB/bsddb3Storage/bsddb3Storage/BerkeleyBase.py 1.16 => 1.16.2.1 ===
--- StandaloneZODB/bsddb3Storage/bsddb3Storage/BerkeleyBase.py:1.16 Mon Mar 18 09:26:25 2002
+++ StandaloneZODB/bsddb3Storage/bsddb3Storage/BerkeleyBase.py Mon Aug 12 18:57:52 2002
@@ -165,8 +165,9 @@
def getSize(self):
"""Return the size of the database."""
- # TBD: this is expensive to calculate and many not be necessary.
- return 'too hard to determine'
+ # Return the size of the pickles table as a rough estimate
+ filename = os.path.join(self._env.db_home, 'zodb_pickles')
+ return os.path.getsize(filename)
# BAW: this overrides BaseStorage.tpc_vote() with exactly the same
# implementation. This is so Zope 2.3.1, which doesn't include the change