Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
bcc
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
bcc
Commits
da365c71
Commit
da365c71
authored
Mar 11, 2016
by
4ast
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #435 from iovisor/bblanco_dev
Fix python3 incompatibilities
parents
4ee0b76e
c94ab7a0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
tools/dcstat.py
tools/dcstat.py
+2
-2
tools/memleak.py
tools/memleak.py
+1
-1
No files found.
tools/dcstat.py
View file @
da365c71
...
...
@@ -103,7 +103,7 @@ stats = {
# header
print
(
"%-8s "
%
"TIME"
,
end
=
""
)
for
stype
,
idx
in
sorted
(
stats
.
ite
ritems
(),
key
=
lambda
(
k
,
v
):
(
v
,
k
)):
for
stype
,
idx
in
sorted
(
stats
.
ite
ms
(),
key
=
lambda
k_v
:
(
k_v
[
1
],
k_v
[
0
]
)):
print
(
" %8s"
%
(
stype
+
"/s"
),
end
=
""
)
print
(
" %8s"
%
"HIT%"
)
...
...
@@ -123,7 +123,7 @@ while (1):
print
(
"%-8s: "
%
strftime
(
"%H:%M:%S"
),
end
=
""
)
# print each statistic as a column
for
stype
,
idx
in
sorted
(
stats
.
ite
ritems
(),
key
=
lambda
(
k
,
v
):
(
v
,
k
)):
for
stype
,
idx
in
sorted
(
stats
.
ite
ms
(),
key
=
lambda
k_v
:
(
k_v
[
1
],
k_v
[
0
]
)):
try
:
val
=
b
[
"stats"
][
c_int
(
idx
)].
value
/
interval
print
(
" %8d"
%
val
,
end
=
""
)
...
...
tools/memleak.py
View file @
da365c71
...
...
@@ -385,7 +385,7 @@ def print_outstanding():
count_so_far
=
0
while
True
:
if
trace_all
:
print
bpf_program
.
trace_fields
(
)
print
(
bpf_program
.
trace_fields
()
)
else
:
try
:
sleep
(
interval
)
...
...
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