How do you set readily benchmark between connections using Curl

yc
yc
Sep 6, 2018 · 1 min read

When trying to measure your performance, could we just do it in easy way ?

Apparently, the answer is yes. There’re many references. I just referred from Stackoverflows with Curl. Curl provides many options including escaping certificate checking, calling in various HTTP methods, and carrying media files.

First, I defined the format files as follows.

    time_namelookup:  %{time_namelookup}\n
time_connect: %{time_connect}\n
time_appconnect: %{time_appconnect}\n
time_pretransfer: %{time_pretransfer}\n
time_redirect: %{time_redirect}\n
time_starttransfer: %{time_starttransfer}\n
----------\n
time_total: %{time_total}\n

Then, using following command measures your connection

curl -w "@format.txt" -o /dev/null -k -s http://medium.com

arguments illustrated :

the last argument is your target. It is easy enough. BTW, you can directly assign format without designate format files as document says. Good luck to you guys.

yc

yc

Enthusiast in being a good programmer, and try to make this thing fusion with my life without any stress.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade