feat: runExportFlow/runGetFlowにAPI通信・書込処理の区間計測(Timer)を追加
Export方式の処理時間がGet方式より長い件を調査するため計測を追加。 結果、ボトルネックはAPI通信側(サーバー処理)でパース・書込処理ではないと判明したため、今後の検証用に計測コードは残す。
This commit is contained in:
parent
81c9f67331
commit
cb01653d77
@ -59,15 +59,21 @@ End Sub
|
||||
'成功時True、データを取得できなかった場合Falseを返す
|
||||
Function runExportFlow() As Boolean
|
||||
Dim resData As Variant
|
||||
Dim t0 As Double, t1 As Double, t2 As Double
|
||||
|
||||
Debug.Print "データ取得処理開始(Export方式)"
|
||||
t0 = Timer
|
||||
resData = exportCSVData(tableId)
|
||||
t1 = Timer
|
||||
Debug.Print " exportCSVData(API通信) 所要時間: " & Format(t1 - t0, "0.000") & "秒"
|
||||
|
||||
If IsEmpty(resData) Or resData = "" Then
|
||||
Debug.Print "データが取得できませんでした"
|
||||
runExportFlow = False
|
||||
Else
|
||||
Call exportCSVDataToSheet(resData, tableId & "E")
|
||||
t2 = Timer
|
||||
Debug.Print " exportCSVDataToSheet(パース+書込) 所要時間: " & Format(t2 - t1, "0.000") & "秒"
|
||||
runExportFlow = True
|
||||
End If
|
||||
End Function
|
||||
@ -77,9 +83,13 @@ End Function
|
||||
'成功時True、データを取得できなかった場合Falseを返す
|
||||
Function runGetFlow() As Boolean
|
||||
Dim records As Collection
|
||||
Dim t0 As Double, t1 As Double, t2 As Double
|
||||
|
||||
Debug.Print "データ取得処理開始(Get方式)"
|
||||
t0 = Timer
|
||||
Set records = getRecordsData(tableId)
|
||||
t1 = Timer
|
||||
Debug.Print " getRecordsData(API通信) 所要時間: " & Format(t1 - t0, "0.000") & "秒"
|
||||
|
||||
If records Is Nothing Then
|
||||
Debug.Print "データが取得できませんでした"
|
||||
@ -89,6 +99,8 @@ Function runGetFlow() As Boolean
|
||||
runGetFlow = False
|
||||
Else
|
||||
Call getRecordsDataToSheet(records, tableId & "G")
|
||||
t2 = Timer
|
||||
Debug.Print " getRecordsDataToSheet(書込) 所要時間: " & Format(t2 - t1, "0.000") & "秒"
|
||||
runGetFlow = True
|
||||
End If
|
||||
End Function
|
||||
|
||||
Loading…
Reference in New Issue
Block a user