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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kirill Smelkov
ZODB
Commits
60b62fc0
Commit
60b62fc0
authored
Oct 05, 2021
by
dieter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix more PY3 incompatibilities in `fsstats`
parent
7d061726
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
5 deletions
+4
-5
src/ZODB/scripts/fsstats.py
src/ZODB/scripts/fsstats.py
+4
-5
No files found.
src/ZODB/scripts/fsstats.py
View file @
60b62fc0
...
@@ -31,8 +31,7 @@ class Histogram(dict):
...
@@ -31,8 +31,7 @@ class Histogram(dict):
def median(self):
def median(self):
# close enough?
# close enough?
n = self.size() / 2
n = self.size() / 2
L = self.keys()
L = sorted(self.keys())
L.sort()
L.reverse()
L.reverse()
while 1:
while 1:
k = L.pop()
k = L.pop()
...
@@ -55,9 +54,9 @@ class Histogram(dict):
...
@@ -55,9 +54,9 @@ class Histogram(dict):
except ValueError:
except ValueError:
maxkey = 0
maxkey = 0
self.binsize = binsize
self.binsize = binsize
self.bins = [0] * (1 + maxkey / binsize)
self.bins = [0] * (1 + maxkey /
/
binsize)
for k, v in six.iteritems(self):
for k, v in six.iteritems(self):
b = k / binsize
b = k /
/
binsize
self.bins[b] += v
self.bins[b] += v
def report(self, name, binsize=50, usebins=False, gaps=True, skip=True):
def report(self, name, binsize=50, usebins=False, gaps=True, skip=True):
...
@@ -91,7 +90,7 @@ class Histogram(dict):
...
@@ -91,7 +90,7 @@ class Histogram(dict):
cum += n
cum += n
pc = 100 * cum / tot
pc = 100 * cum / tot
print("
%
6
d
%
6
d
%
3
d
%%
%
3
d
%%
%
s
" % (
print("
%
6
d
%
6
d
%
3
d
%%
%
3
d
%%
%
s
" % (
i * binsize, n, p, pc, "
*
" * (n / dot)))
i * binsize, n, p, pc, "
*
" * (n /
/
dot)))
print()
print()
def class_detail(class_size):
def class_detail(class_size):
...
...
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