Skip to content

Commit 0023ce1

Browse files
committed
fix: format
1 parent de2e553 commit 0023ce1

File tree

1 file changed

+4
-15
lines changed

1 file changed

+4
-15
lines changed

ptop.py

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -61,16 +61,9 @@ def ascii_progress_bar(percentage, bar_length=50):
6161

6262
clear_console()
6363
print(ascii_progress_bar(progress(lines, tj)))
64-
print(
65-
"--------------------------------------------------------------"
66-
)
67-
print(
68-
"Host Throughput (jobs/s) Total Successful Failed"
69-
)
70-
print(
71-
"--------------------------------------------------------------"
72-
)
73-
64+
print("--------------------------------------------------------------")
65+
print("Host Throughput (jobs/s) Total Successful Failed")
66+
print("--------------------------------------------------------------")
7467

7568
for line in new_lines:
7669
parsed_line = parse(line.replace("\x00", ""))
@@ -97,12 +90,10 @@ def ascii_progress_bar(percentage, bar_length=50):
9790
failed_overall = 0
9891

9992
for host, stats in hosts.items():
100-
10193
throughput = len(stats["jobs"]) / (
10294
time.mktime(time.gmtime())
10395
- time.mktime(stats["jobs"][0]["starttime"])
10496
)
105-
10697
throughput_overall += throughput
10798
totel_overall += stats["total"]
10899
succsessful_overall += stats["successful"]
@@ -112,9 +103,7 @@ def ascii_progress_bar(percentage, bar_length=50):
112103
f"{host:12} {throughput:.2f} {stats['total']:5} {stats['successful']:5} {stats['failed']:5}"
113104
)
114105

115-
print(
116-
"--------------------------------------------------------------"
117-
)
106+
print("--------------------------------------------------------------")
118107
print(
119108
f"{'overall':12} {throughput_overall:.2f} {totel_overall:5} {succsessful_overall:5} {failed_overall:5}"
120109
)

0 commit comments

Comments
 (0)