Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
ZODB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Nicolas Wavrant
ZODB
Commits
fd0704e8
Commit
fd0704e8
authored
Dec 12, 2002
by
Jeremy Hylton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Give the report a header and some fixed-length fields.
parent
b92b4a8f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
6 deletions
+12
-6
src/scripts/parsezeolog.py
src/scripts/parsezeolog.py
+12
-6
No files found.
src/scripts/parsezeolog.py
View file @
fd0704e8
...
@@ -49,18 +49,23 @@ class TStats:
...
@@ -49,18 +49,23 @@ class TStats:
self
.
id
=
TStats
.
counter
self
.
id
=
TStats
.
counter
TStats
.
counter
+=
1
TStats
.
counter
+=
1
fields
=
(
"time"
,
"vote"
,
"done"
,
"user"
,
"path"
)
fmt
=
"%-24s %5s %5s %-15s %s"
hdr
=
fmt
%
fields
def
report
(
self
):
def
report
(
self
):
"""Print a report about the transaction"""
"""Print a report about the transaction"""
print
time
.
ctime
(
self
.
begin
),
t
=
time
.
ctime
(
self
.
begin
)
if
hasattr
(
self
,
"vote"
):
if
hasattr
(
self
,
"vote"
):
print
self
.
vote
-
self
.
begin
,
d_vote
=
self
.
vote
-
self
.
begin
else
:
else
:
print
"*"
,
d_vote
=
"*"
if
hasattr
(
self
,
"finish"
):
if
hasattr
(
self
,
"finish"
):
print
self
.
finish
-
self
.
begin
,
d_finish
=
self
.
finish
-
self
.
begin
else
:
else
:
print
"*"
,
d_finish
=
"*"
print
self
.
user
,
self
.
url
print
self
.
fmt
%
(
time
.
ctime
(
self
.
begin
),
d_vote
,
d_finish
,
self
.
user
,
self
.
url
)
class
TransactionParser
:
class
TransactionParser
:
...
@@ -124,5 +129,6 @@ if __name__ == "__main__":
...
@@ -124,5 +129,6 @@ if __name__ == "__main__":
print
"line"
,
i
print
"line"
,
i
raise
raise
print
"Transaction: %d"
%
len
(
p
.
txns
)
print
"Transaction: %d"
%
len
(
p
.
txns
)
print
TStats
.
hdr
for
txn
in
p
.
get_txns
():
for
txn
in
p
.
get_txns
():
txn
.
report
()
txn
.
report
()
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment