File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed
utils/swift_build_support/swift_build_support Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -97,12 +97,13 @@ def log_analyzer():
9797 print ("================ \t ==================== \t ===========" ,
9898 file = sys .stderr )
9999 event_row = '{:<17.1%} \t {:<21} \t {}'
100- for build_event in finish_events :
101- duration_percentage = \
102- (float (build_event ["duration" ]) / float (total_duration ))
103- print (event_row .format (duration_percentage ,
104- build_event ["duration" ],
105- build_event ["command" ]), file = sys .stderr )
100+ if total_duration > 0 :
101+ for build_event in finish_events :
102+ duration_percentage = \
103+ (float (build_event ["duration" ]) / float (total_duration ))
104+ print (event_row .format (duration_percentage ,
105+ build_event ["duration" ],
106+ build_event ["command" ]), file = sys .stderr )
106107
107108 hours , remainder = divmod (total_duration , 3600 )
108109 minutes , seconds = divmod (remainder , 60 )
You can’t perform that action at this time.
0 commit comments