File tree Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ # Required parameters:
4
+ # @raycast.schemaVersion 1
5
+ # @raycast.title Get TTFB (Time to First Byte)
6
+ # @raycast.mode fullOutput
7
+
8
+ # Optional parameters:
9
+ # @raycast.icon 🕐
10
+ # @raycast.packageName Developer Utils
11
+
12
+ # Documentation:
13
+ # @raycast.description Get the TTFB (Time to First Byte) of a website
14
+ # @raycast.author Angelos Michalopoulos
15
+ # @raycast.authorURL https://github.com/miagg
16
+ # @raycast.argument1 { "type": "text", "placeholder": "domain" }
17
+
18
+ if [ -z " $1 " ]; then
19
+ echo " Please provide a domain"
20
+ exit 1
21
+ fi
22
+
23
+ curl -o /dev/null \
24
+ -H ' Cache-Control: no-cache' \
25
+ -s \
26
+ -w " \nLookup time:\t\t\t%{time_namelookup}\nConnect time:\t\t%{time_connect}\nSSL handshake time:\t%{time_appconnect}\nPre-Transfer time:\t%{time_pretransfer}\nRedirect time:\t\t%{time_redirect}\nTime to first byte:\t%{time_starttransfer}\n\nTotal time:\t\t\t%{time_total}\n" \
27
+ --fail \
28
+ --silent \
29
+ --show-error \
30
+ " $1 "
You can’t perform that action at this time.
0 commit comments