How To Love ZODB and Forget RDBMS - Part V |
Created by adytumsolutions . Last modified 2004-03-17 04:19:19. |
So, We Can Look at Transactions 'n' Stuff? |
-== Note: Work in progres ==- I am publishing this page as a notice similar to "Road Closed Ahead", so that people following this tutorial don't come crashing into a brick wall at the end of Part IV. I am hoping to finish this series up soon - I do truly understand the need for the material to be explained in a lucid, friendly fashion and don't see this merely as a luxury. For now, this "road block" is little more than very unfriendly, as I am publishing this unfinished work. It's been stubbed out with commands and the output from the database we created together in the previous parts. The intention is to fill these stubs out with eplanatory comments and deep, meaningful comments ;-) What I encourage you to do is the following:
-== End of Caveat ;-) ==- Let's use some tools that come with ZODB to peer inside the FileStorage Database file we created in Parts II to IV. Where This command: cd ZODB/Tools python analyze.py /tmp/pymonitor.fs gives the following output: Processed 3 records in 2 transactions Average record size is 198.67 bytes Average transaction size is 298.00 bytes Types used: Class Name Count TBytes Pct AvgSize ---------------------------------------------- ------- --------- ----- ------- ...PersistentMapping at 76a020> 2 189 31.7% 94.50 BTrees.OOBTree.OOBTree 1 407 68.3% 407.00 ============================================== ======= ========= ===== ======= Total Transactions 2 0.29k Total Records 3 0k 100.0% 198.67 Current Objects 2 0k 90.1% 268.50 Old Objects 1 0k 9.9% 59.00 This command: python checkbtrees.py /tmp/pymonitor.fs gives the following output: <root> {'monitoring_db': <OOBTree object at 0x1129ad8>} ['monitoring_db'] <OOBTree object at 0x1129ad8> total 2 found 2 This command: python fsdump.py /tmp/pymonitor.fs gives the following output: Trans #00000 tid=03535bbb7ea34444 time=2004-02-28 06:19:29.680725 offset=52 status=' ' user= description=initial database creation data #00000 oid=0000000000000000 class=Persistence.PersistentMapping Trans #00001 tid=03535bbb7eda33bb time=2004-02-28 06:19:29.731020 offset=184 status=' ' user= description= data #00000 oid=0000000000000000 class=Persistence.PersistentMapping data #00001 oid=0000000000000001 class=BTrees.OOBTree.OOBTree This command: python fstail.py /tmp/pymonitor.fs gives the following output: 2004-02-28 06:19:29.731020: hash=ac5f648667fcf05c491b26976ed62dc8e700cfb3 user='' description='' length=644 2004-02-28 06:19:29.680725: hash=dd324326a5424573716c7155be1f88f99cc96bba user='' description='initial database creation' length=149 This command: python netspace.py /tmp/pymonitor.fs gives the following output: 1 407 407 monitoring_db BTrees.OOBTree.OOBTree This command: python space.py /tmp/pymonitor.fs gives the following output: Totals per object class: 1 407 BTrees.OOBTree.OOBTree 1 130 Persistence.PersistentMapping On to Part VI |