cURLでレスポンス速度を計測する

cURLでレスポンス速度を計測する

cURLでレスポンスを計測する方法を記録しておきます。

format

formatファイルを作成しておきます。

http_code           %{http_code}\n
size_upload         %{size_upload}\n
speed_upload        %{speed_upload}\n
size_download       %{size_download}\n
speed_download      %{speed_download}\n
time_pretransfer    %{time_pretransfer}\n
time_starttransfer  %{time_starttransfer}\n
time_total          %{time_total}\n

curl

以下のコマンドでレスポンス速度を計測出来ます。

curl -s -o /dev/null -w @format https://hoge.com
http_code           200
size_upload         0
speed_upload        0.000
size_download       126
speed_download      611.000
time_pretransfer    0.178879
time_starttransfer  0.205739
time_total          0.205941

Comments

No comments yet. Why don’t you start the discussion?

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です