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を返す
|
'成功時True、データを取得できなかった場合Falseを返す
|
||||||
Function runExportFlow() As Boolean
|
Function runExportFlow() As Boolean
|
||||||
Dim resData As Variant
|
Dim resData As Variant
|
||||||
|
Dim t0 As Double, t1 As Double, t2 As Double
|
||||||
|
|
||||||
Debug.Print "データ取得処理開始(Export方式)"
|
Debug.Print "データ取得処理開始(Export方式)"
|
||||||
|
t0 = Timer
|
||||||
resData = exportCSVData(tableId)
|
resData = exportCSVData(tableId)
|
||||||
|
t1 = Timer
|
||||||
|
Debug.Print " exportCSVData(API通信) 所要時間: " & Format(t1 - t0, "0.000") & "秒"
|
||||||
|
|
||||||
If IsEmpty(resData) Or resData = "" Then
|
If IsEmpty(resData) Or resData = "" Then
|
||||||
Debug.Print "データが取得できませんでした"
|
Debug.Print "データが取得できませんでした"
|
||||||
runExportFlow = False
|
runExportFlow = False
|
||||||
Else
|
Else
|
||||||
Call exportCSVDataToSheet(resData, tableId & "E")
|
Call exportCSVDataToSheet(resData, tableId & "E")
|
||||||
|
t2 = Timer
|
||||||
|
Debug.Print " exportCSVDataToSheet(パース+書込) 所要時間: " & Format(t2 - t1, "0.000") & "秒"
|
||||||
runExportFlow = True
|
runExportFlow = True
|
||||||
End If
|
End If
|
||||||
End Function
|
End Function
|
||||||
@ -77,9 +83,13 @@ End Function
|
|||||||
'成功時True、データを取得できなかった場合Falseを返す
|
'成功時True、データを取得できなかった場合Falseを返す
|
||||||
Function runGetFlow() As Boolean
|
Function runGetFlow() As Boolean
|
||||||
Dim records As Collection
|
Dim records As Collection
|
||||||
|
Dim t0 As Double, t1 As Double, t2 As Double
|
||||||
|
|
||||||
Debug.Print "データ取得処理開始(Get方式)"
|
Debug.Print "データ取得処理開始(Get方式)"
|
||||||
|
t0 = Timer
|
||||||
Set records = getRecordsData(tableId)
|
Set records = getRecordsData(tableId)
|
||||||
|
t1 = Timer
|
||||||
|
Debug.Print " getRecordsData(API通信) 所要時間: " & Format(t1 - t0, "0.000") & "秒"
|
||||||
|
|
||||||
If records Is Nothing Then
|
If records Is Nothing Then
|
||||||
Debug.Print "データが取得できませんでした"
|
Debug.Print "データが取得できませんでした"
|
||||||
@ -89,6 +99,8 @@ Function runGetFlow() As Boolean
|
|||||||
runGetFlow = False
|
runGetFlow = False
|
||||||
Else
|
Else
|
||||||
Call getRecordsDataToSheet(records, tableId & "G")
|
Call getRecordsDataToSheet(records, tableId & "G")
|
||||||
|
t2 = Timer
|
||||||
|
Debug.Print " getRecordsDataToSheet(書込) 所要時間: " & Format(t2 - t1, "0.000") & "秒"
|
||||||
runGetFlow = True
|
runGetFlow = True
|
||||||
End If
|
End If
|
||||||
End Function
|
End Function
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user