Skip to content

Commit

Permalink
tools: Fix bytes<->str mixing in python3
Browse files Browse the repository at this point in the history
  • Loading branch information
xingfeng2510 authored and yonghong-song committed Mar 16, 2022
1 parent b2e363d commit 55dcd2e
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion tools/btrfsdist.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@
if args.interval and (not args.notimestamp):
print(strftime("%H:%M:%S:"))

dist.print_log2_hist(label, "operation")
dist.print_log2_hist(label, "operation", section_print_fn=bytes.decode)
dist.clear()

countdown -= 1
Expand Down
2 changes: 1 addition & 1 deletion tools/hardirqs.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@
print("%-8s\n" % strftime("%H:%M:%S"), end="")

if args.dist:
dist.print_log2_hist(label, "hardirq")
dist.print_log2_hist(label, "hardirq", section_print_fn=bytes.decode)
else:
print("%-26s %11s" % ("HARDIRQ", "TOTAL_" + label))
for k, v in sorted(dist.items(), key=lambda dist: dist[1].value):
Expand Down
2 changes: 1 addition & 1 deletion tools/xfsdist.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@
if args.interval and (not args.notimestamp):
print(strftime("%H:%M:%S:"))

dist.print_log2_hist(label, "operation")
dist.print_log2_hist(label, "operation", section_print_fn=bytes.decode)
dist.clear()

countdown -= 1
Expand Down
2 changes: 1 addition & 1 deletion tools/zfsdist.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@
if args.interval and (not args.notimestamp):
print(strftime("%H:%M:%S:"))

dist.print_log2_hist(label, "operation")
dist.print_log2_hist(label, "operation", section_print_fn=bytes.decode)
dist.clear()

countdown -= 1
Expand Down

0 comments on commit 55dcd2e

Please sign in to comment.