DevOps & APIs • Published August 17, 2026

cURL Debugging & Performance Metrics: -v, --trace, Timings & Network Profiling

Master cURL network profiling and debugging. Learn how to use -v, --trace-ascii, and the -w write-out format to measure DNS lookup, TLS handshake, TTFB, and transfer latency.

Master cURL performance profiling and network debugging. Learn how to extract microsecond connection timings with -w, inspect TLS handshake steps with -v and --trace, and identify API bottlenecks.

Frequently Asked Questions

Q1. What do the >, <, and symbols mean in curl -v output?

indicates informational messages generated by cURL (e.g. DNS resolution, TLS handshake). > indicates data and headers sent by your client to the server. < indicates data and headers received back from the server.

Q2. How do I measure Time to First Byte (TTFB) using cURL?

Run: curl -s -o /dev/null -w "TTFB: %{time_starttransfer}s\n" https://example.com.

Q3. How do I only output the HTTP status code from cURL in a bash script?

Use: curl -s -o /dev/null -w "%{http_code}" https://api.example.com.

Q4. What is the difference between time_connect and time_appconnect?

time_connect is the time it took to complete the TCP 3-way handshake. time_appconnect is the cumulative time until the SSL/TLS cryptographic handshake was fully negotiated.