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
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
Kirill Smelkov
ZEO
Commits
35139193
Commit
35139193
authored
Sep 04, 2002
by
Guido van Rossum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Report number of records with data, and average data size (over those
records). Report distribution of "current file" bit.
parent
48f9da5d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
2 deletions
+19
-2
src/ZEO/stats.py
src/ZEO/stats.py
+19
-2
No files found.
src/ZEO/stats.py
View file @
35139193
...
@@ -88,6 +88,9 @@ def main():
...
@@ -88,6 +88,9 @@ def main():
records
=
0
records
=
0
versions
=
0
versions
=
0
t0
=
te
=
None
t0
=
te
=
None
datarecords
=
0
datasize
=
0L
file0
=
file1
=
0
while
1
:
while
1
:
r
=
f
.
read
(
24
)
r
=
f
.
read
(
24
)
if
len
(
r
)
<
24
:
if
len
(
r
)
<
24
:
...
@@ -98,11 +101,18 @@ def main():
...
@@ -98,11 +101,18 @@ def main():
t0
=
ts
t0
=
ts
te
=
ts
te
=
ts
dlen
,
code
=
code
&
0x7fffff00
,
code
&
0xff
dlen
,
code
=
code
&
0x7fffff00
,
code
&
0xff
if
dlen
:
datarecords
+=
1
datasize
+=
dlen
version
=
'-'
version
=
'-'
if
code
&
0x80
:
if
code
&
0x80
:
version
=
'V'
version
=
'V'
versions
+=
1
versions
+=
1
current
=
code
&
1
current
=
code
&
1
if
current
:
file1
+=
1
else
:
file0
+=
1
code
=
code
&
0x7e
code
=
code
&
0x7e
bycode
[
code
]
=
bycode
.
get
(
code
,
0
)
+
1
bycode
[
code
]
=
bycode
.
get
(
code
,
0
)
+
1
if
verbose
:
if
verbose
:
...
@@ -125,13 +135,20 @@ def main():
...
@@ -125,13 +135,20 @@ def main():
# Print statistics
# Print statistics
if
dostats
:
if
dostats
:
print
if
verbose
:
print
print
"Read %s records (%s bytes) in %.1f seconds"
%
(
print
"Read %s records (%s bytes) in %.1f seconds"
%
(
addcommas
(
records
),
addcommas
(
bytes
),
rte
-
rt0
)
addcommas
(
records
),
addcommas
(
bytes
),
rte
-
rt0
)
print
"Version
bit set in
%s records"
%
addcommas
(
versions
)
print
"Version
:
%s records"
%
addcommas
(
versions
)
print
"First time: %s"
%
time
.
ctime
(
t0
)
print
"First time: %s"
%
time
.
ctime
(
t0
)
print
"Last time: %s"
%
time
.
ctime
(
te
)
print
"Last time: %s"
%
time
.
ctime
(
te
)
print
"Duration: %s seconds"
%
addcommas
(
te
-
t0
)
print
"Duration: %s seconds"
%
addcommas
(
te
-
t0
)
print
"File stats: %s in file 0; %s in file 1"
%
(
addcommas
(
file0
),
addcommas
(
file1
))
print
"Data recs: %s (%.1f%%), average size %.1f KB"
%
(
addcommas
(
datarecords
),
100.0
*
datarecords
/
records
,
datasize
/
1024.0
/
datarecords
)
print
print
codes
=
bycode
.
keys
()
codes
=
bycode
.
keys
()
codes
.
sort
()
codes
.
sort
()
...
...
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