1
1
import sys
2
+ import time
2
3
import argparse
3
4
import json
4
5
import logging
@@ -45,12 +46,15 @@ def main(generate_input, generate_output):
45
46
prefolder = prefolder ,
46
47
is_multiapi = package ["isMultiapi" ],
47
48
)
49
+
50
+ changelog_generation_start_time = time .time ()
48
51
try :
49
52
md_output = execute_func_with_timeout (change_log_func )
50
53
except multiprocessing .TimeoutError :
51
54
md_output = "change log generation was timeout!!!"
52
55
except :
53
56
md_output = "change log generation failed!!!"
57
+ _LOGGER .info (f"changelog generation cost time: { int (time .time () - changelog_generation_start_time )} seconds" )
54
58
package ["changelog" ] = {
55
59
"content" : md_output ,
56
60
"hasBreakingChange" : "Breaking Changes" in md_output ,
@@ -61,6 +65,7 @@ def main(generate_input, generate_output):
61
65
_LOGGER .info (f"[PACKAGE]({ package_name } )[CHANGELOG]:{ md_output } " )
62
66
# Generate api stub File
63
67
folder_name = package ["path" ][0 ]
68
+ apiview_start_time = time .time ()
64
69
try :
65
70
package_path = Path (sdk_folder , folder_name , package_name )
66
71
check_call (
@@ -82,6 +87,7 @@ def main(generate_input, generate_output):
82
87
package ["apiViewArtifact" ] = str (Path (package_path , file ))
83
88
except Exception as e :
84
89
_LOGGER .debug (f"Fail to generate ApiView token file for { package_name } : { e } " )
90
+ _LOGGER .info (f"apiview generation cost time: { int (time .time () - apiview_start_time )} seconds" )
85
91
86
92
# check generated files and update package["version"]
87
93
if package_name .startswith ("azure-mgmt-" ):
0 commit comments