Last change
on this file since 8468 was
8417,
checked in by uli, 13 years ago
|
Add function to call ZODB analyze script.
|
File size:
676 bytes
|
Line | |
---|
1 | """Helpers for maintainers of kofa sites. |
---|
2 | |
---|
3 | XXX: This stuff might go into a separate package, but right |
---|
4 | now it is too less for a complete package. |
---|
5 | """ |
---|
6 | import sys |
---|
7 | from ZODB.scripts.analyze import report, analyze |
---|
8 | |
---|
9 | def db_analyze(args=None): |
---|
10 | """Run the analyze tool from ZODB package. |
---|
11 | """ |
---|
12 | if args is None: |
---|
13 | args = sys.argv[1:] |
---|
14 | |
---|
15 | path = None |
---|
16 | if len(args) > 0: |
---|
17 | path = args[0] |
---|
18 | else: |
---|
19 | print |
---|
20 | print "Analyze a ZODB file and print statistics" |
---|
21 | print "about contained objects, sizes, etc." |
---|
22 | print |
---|
23 | print "Usage: %s <path-to-Data.fs>" % sys.argv[0] |
---|
24 | print |
---|
25 | sys.exit(0) |
---|
26 | |
---|
27 | report(analyze(path)) |
---|
Note: See
TracBrowser for help on using the repository browser.