Jump to content

Search the Community

Showing results for tags 'website metrics'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Informatii generale
    • Anunturi importante
    • Bine ai venit
    • Proiecte RST
  • Sectiunea tehnica
    • Exploituri
    • Challenges (CTF)
    • Bug Bounty
    • Programare
    • Securitate web
    • Reverse engineering & exploit development
    • Mobile security
    • Sisteme de operare si discutii hardware
    • Electronica
    • Wireless Pentesting
    • Black SEO & monetizare
  • Tutoriale
    • Tutoriale in romana
    • Tutoriale in engleza
    • Tutoriale video
  • Programe
    • Programe hacking
    • Programe securitate
    • Programe utile
    • Free stuff
  • Discutii generale
    • RST Market
    • Off-topic
    • Discutii incepatori
    • Stiri securitate
    • Linkuri
    • Cosul de gunoi
  • Club Test's Topics
  • Clubul saraciei absolute's Topics
  • Chernobyl Hackers's Topics
  • Programming & Fun's Jokes / Funny pictures (programming related!)
  • Programming & Fun's Programming
  • Programming & Fun's Programming challenges
  • Bani pă net's Topics
  • Cumparaturi online's Topics
  • Web Development's Forum
  • 3D Print's Topics

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Yahoo


Jabber


Skype


Location


Interests


Biography


Location


Interests


Occupation

Found 1 result

  1. I have written a short bash function for measuring website metrics such as DNS lookup, redirects, redirect time, the first byte (TTFB), connect time and the total time. Short version (Only TTFB) function ttfb() { if [ $# -eq 0 ] then echo "Usage: ttfb url" else curl -o /dev/null \ -H 'Cache-Control: no-cache' \ -s \ -w "Connect: %{time_connect} TTFB: %{time_starttransfer} Total time: %{time_total} \n" \ $1 fi } Usage example: aelius@macbook:~$ ttfb Usage: ttfb url aelius@macbook:~$ ttfb https://www.unixteacher.org/ Connect: 0.046315 TTFB: 0.157112 Total time: 0.157400 aelius@macbook:~$ Long version (DNS Lookup, Redirects, Redirect time, First byte, Connect time, Total time) function metrics { if [ $# -eq 0 ] then echo "Usage: metrics url" else curl -H 'Cache-Control: no-cache' -Lw "DNS Lookup: %{time_namelookup} seconds \nRedirects: %{time_redirect} seconds with %{num_redirects} redirects \nFirst Byte: %{time_starttransfer} seconds \nConnect Time: %{time_connect} seconds \nTotal Time: %{time_total} seconds\n" -so /dev/null $1 fi } Usage example aelius@macbook:~$ metrics Usage: metrics url aelius@macbook:~$ metrics https://www.unixteacher.org/ DNS Lookup: 0.009266 seconds Redirects: 0.000000 seconds with 0 redirects First Byte: 0.173887 seconds Connect Time: 0.051254 seconds Total Time: 0.174168 seconds aelius@macbook:~$ References: – https://en.wikipedia.org/wiki/Time_to_first_byte – https://curl.haxx.se/docs/manual.html Published on UnixTeacher: https://www.unixteacher.org/blog/measuring-website-metrics-with-curl/
×
×
  • Create New...