@@ -78,10 +78,12 @@ def print_generic_error(out):
78
78
</div>
79
79
</div>''' ), file = out )
80
80
81
- def print_footer (out , generated_info ):
81
+ def print_footer (out , started_at , generated_info ):
82
82
now = datetime .now ()
83
+ duration = now - started_at
83
84
print (dedent (f'''
84
- Last generated at { now } . { generated_info or '' }
85
+ Generated on { now .date ()} at { now .time ().strftime ("%H:%M:%S" )} (took { duration .seconds } seconds).
86
+ { generated_info or '' }
85
87
</body>
86
88
</html>
87
89
''' ), file = out )
@@ -253,6 +255,9 @@ def find_pull_requests(gh, repo, start_sha, end_sha):
253
255
prs .update (commit_prs )
254
256
return sorted (prs , key = lambda p : p .number , reverse = True )
255
257
258
+
259
+ started_at = datetime .now ()
260
+
256
261
parser = argparse .ArgumentParser (description = 'Generate a report of the packages in the pipe' )
257
262
parser .add_argument ('output' , nargs = '?' , help = 'Report output path' , default = 'report.html' )
258
263
parser .add_argument ('--generated-info' , help = "Add this message about the generation in the report" )
@@ -331,7 +336,7 @@ def find_pull_requests(gh, repo, start_sha, end_sha):
331
336
print_generic_error (out )
332
337
raise
333
338
finally :
334
- print_footer (out , args .generated_info )
339
+ print_footer (out , started_at , args .generated_info )
335
340
336
341
# write the actual output at once, in order to avoid a blank page during the processing
337
342
with open (args .output , 'w' ) as f :
0 commit comments