zopefoundation / ZODB

Python object-oriented database
https://zodb-docs.readthedocs.io/
Other
672 stars 90 forks source link

`fsstats` no longer matches output of `fsdump` #354

Closed d-maurer closed 2 years ago

d-maurer commented 2 years ago

ZODB==5.6.0

scripts.fsstats is supposed to derive statistics from the output of FileStorage.fsdump. However, it no longer understands this output.

Transaction records produced by fsdump look like

Trans #00000 tid=038e1d5f01b145cc time=2011-05-05 07:59:00.396673 offset=70
    status='p' user='' description='Created Zope Application\n\nAdded temp_folder'

and data records like

  data #00000 oid=0000000000000006 size=141 class=Products.ZODBMountPoint.MountedObject.MountedObject

but fsstats tries to match transaction records with re "tid=([0-9a-f]+).*size=(\d+)" (i.e. it expects size information after tid) and data records with re "oid=([0-9a-f]+) class=(\S+) size=(\d+)" (i.e. it expects size and class interchanged).