Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
ZEO
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
ZEO
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
Hide 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
...
...
@@ -48,19 +48,24 @@ class TStats:
def
__init__
(
self
):
self
.
id
=
TStats
.
counter
TStats
.
counter
+=
1
fields
=
(
"time"
,
"vote"
,
"done"
,
"user"
,
"path"
)
fmt
=
"%-24s %5s %5s %-15s %s"
hdr
=
fmt
%
fields
def
report
(
self
):
"""Print a report about the transaction"""
print
time
.
ctime
(
self
.
begin
),
t
=
time
.
ctime
(
self
.
begin
)
if
hasattr
(
self
,
"vote"
):
print
self
.
vote
-
self
.
begin
,
d_vote
=
self
.
vote
-
self
.
begin
else
:
print
"*"
,
d_vote
=
"*"
if
hasattr
(
self
,
"finish"
):
print
self
.
finish
-
self
.
begin
,
d_finish
=
self
.
finish
-
self
.
begin
else
:
print
"*"
,
print
self
.
user
,
self
.
url
d_finish
=
"*"
print
self
.
fmt
%
(
time
.
ctime
(
self
.
begin
),
d_vote
,
d_finish
,
self
.
user
,
self
.
url
)
class
TransactionParser
:
...
...
@@ -124,5 +129,6 @@ if __name__ == "__main__":
print
"line"
,
i
raise
print
"Transaction: %d"
%
len
(
p
.
txns
)
print
TStats
.
hdr
for
txn
in
p
.
get_txns
():
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