DEV Community

How I measure Response Times of Web APIs using curl

Yuya Takeyama on December 06, 2017

Why curl? There is a bunch of specific tools for benchmarking HTTP requests. ab, JMeter, wrk... Then why still use curl for the purpose?...
Collapse
 
emilienmottet profile image
Emilien Mottet

Good article !
For zsh users, you could use repeat

Collapse
 
welll profile image
Wellington Soares

Nice post!

by the way, why curlb on the last two commands? is it a typo?

Collapse
 
yuyatakeyama profile image
Yuya Takeyama

Hi, did you see this section?

To simplify, I also created a wrapper command curlb:

-s -o /dev/null -w "%{time_starttransfer}\n" is toooo long to type or to remember.
So I always use curlb and recommend using it.

Collapse
 
neo profile image
Neo

Interesting approach

Collapse
 
zinssmeister profile image
Bjoern

This was an interesting post and I got curious to see how this measures up against how we record response time with our product templarbit.com/sonar and found that it works similar!

Collapse
 
zeyuanchen23 profile image
Zeyuan Chen

Hi! Is it possible to use your tool on Mac?
If so, how to install the ntimes?