# Curl can show detailed timing breakdown with -w flag

**Date:** 2025-11-23  
**Tags:** CLI, Debugging, Performance  
**URL:** https://kelexine.is-a.dev/til/curl-time-breakdown

---

TIL: Curl can show detailed timing breakdown with -w flag. DNS lookup, TLS handshake, transfer time—all separated. Diagnosed a slow API: 2s was TLS negotiation, not my code. Added connection pooling, fixed.


```bash
curl -w "\nDNS: %{time_namelookup}s\nConnect: %{time_connect}s\nTLS: %{time_appconnect}s\nTransfer: %{time_starttransfer}s\nTotal: %{time_total}s\n" https://api.example.com
```



**Related:** [https://curl.se/docs/manpage.html](https://curl.se/docs/manpage.html)


---

*This content is available at [kelexine.is-a.dev/til/curl-time-breakdown](https://kelexine.is-a.dev/til/curl-time-breakdown)*
