Mercurial
changeset 23:2d0d0b6c8906
[GuiZe] Adding TTFB calculating script.
| author | June Park <parkjune1995@gmail.com> |
|---|---|
| date | Tue, 07 Oct 2025 08:55:40 -0700 |
| parents | 947b81010aba |
| children | 7d3fa1a7a854 |
| files | gui_ze/BUILD gui_ze/time_to_first_byte.sh |
| diffstat | 2 files changed, 18 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/gui_ze/BUILD Tue Oct 07 07:11:02 2025 -0700 +++ b/gui_ze/BUILD Tue Oct 07 08:55:40 2025 -0700 @@ -1,6 +1,15 @@ load(":gui_ze.bzl", "foo_binary") -print("BUILD file") -foo_binary(name = "bin1") -foo_binary(name = "bin2") +# Test making tools. +# ----- +# print("BUILD file") +# foo_binary(name = "bin1") +# foo_binary(name = "bin2") +# assume it has curl lmao +sh_binary( + name = "ttfb", + srcs = ["time_to_first_byte.sh"], + visibility = ["//visibility:public"], +) +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gui_ze/time_to_first_byte.sh Tue Oct 07 08:55:40 2025 -0700 @@ -0,0 +1,6 @@ +#!/bin/bash +set -euo pipefail + +URL="${1:-http://seobeo.babocoder.com/}" + +curl -o /dev/null -s -w 'namelookup: %{time_namelookup}s\nconnect: %{time_connect}s\ntls: %{time_appconnect}s\nrequest: %{time_pretransfer}s\nTTFB: %{time_starttransfer}s\ntotal: %{time_total}s\n' "$URL"