>_ IzzyLab

Topic breakdown

curl has a built-in request-metrics collector — the -w (write-out) flag prints, from a given template, the values of variables of the form %{...}, among which are connection timings, TTFB, and the total response time. To make only a clean number end up in the file, the response body is silenced by discarding it into /dev/null (the -o flag), and the progress is silenced by quiet mode (-s); otherwise the metric would get mixed with the page itself and service output. The resulting number is redirected to a file via >.

What's checked

  1. latency.txt contains the response time
  2. the service received a request

What it looks like