File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -38,8 +38,8 @@ def parse(input_line: str) -> dict:
3838 return parsed
3939
4040
41- def progress (lines , total_jops ):
42- return (len (lines ) / tj ) * 100 if tj else 0
41+ def progress (lines , total_jobs ):
42+ return (len (lines ) / total_jobs ) * 100 if total_jobs else 0
4343
4444
4545def ascii_progress_bar (percentage , bar_length = 50 ):
@@ -71,6 +71,7 @@ def ascii_progress_bar(percentage, bar_length=50):
7171 "--------------------------------------------------------------"
7272 )
7373
74+
7475 for line in new_lines :
7576 parsed_line = parse (line .replace ("\x00 " , "" ))
7677 host = parsed_line ["host" ]
@@ -96,10 +97,12 @@ def ascii_progress_bar(percentage, bar_length=50):
9697 failed_overall = 0
9798
9899 for host , stats in hosts .items ():
100+
99101 throughput = len (stats ["jobs" ]) / (
100102 time .mktime (time .gmtime ())
101103 - time .mktime (stats ["jobs" ][0 ]["starttime" ])
102104 )
105+
103106 throughput_overall += throughput
104107 totel_overall += stats ["total" ]
105108 succsessful_overall += stats ["successful" ]
You can’t perform that action at this time.
0 commit comments