{"id":8871,"date":"2023-06-07T22:02:23","date_gmt":"2023-06-07T22:02:23","guid":{"rendered":"https:\/\/qbytes.cloud\/?p=8871"},"modified":"2023-06-07T22:42:22","modified_gmt":"2023-06-07T22:42:22","slug":"how-to-test-a-slow-website","status":"publish","type":"post","link":"https:\/\/www.qbytes.cloud\/index.php\/2023\/06\/07\/how-to-test-a-slow-website\/","title":{"rendered":"How to Test a Slow Website"},"content":{"rendered":"\n<p>Curl<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\ncurl -s -w &#039;Testing Website Response Time for :%{url_effective}\\n\\nLookup Time:\\t\\t%{time_namelookup}\\nConnect Time:\\t\\t%{time_connect}\\nPre-transfer Time:\\t%{time_pretransfer}\\nStart-transfer Time:\\t%{time_starttransfer}\\n\\nTotal Time:\\t\\t%{time_total}\\n&#039; -o \/dev\/null https:\/\/www.linuxandotherhstuff.com\/\n<\/pre><\/div>\n\n\n<p>Output:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\nLookup Time:\t\t        0.269010\nConnect Time:\t\t    0.467855\nPre-transfer Time:\t0.840017\nStart-transfer Time:\t1.141663\nTotal Time:\t\t            2.014788\n<\/pre><\/div>\n\n\n<p>A brief explanation of each option is shown below:<\/p>\n\n\n\n<p>time_connect &#8211; Display the time in seconds from the connect was noticed by curl until the first byte arrived.<br>time_namelookup &#8211; Display the time in seconds it took from the start until the name resolving was completed.<br>time_pretransfer &#8211; Display the time in seconds it took from the start until the file transfer was just about to begin.<br>time_starttransfer &#8211; Display the time in seconds from the connect was noticed by curl until the first byte arrived.<br>time_total &#8211; The total time in seconds to perform the operation.<br>-s &#8211; Don&#8217;t display the progress bar.<br>-w &#8211; Used to define what to display on output.<br>-o &#8211; Used to write complete output to \/dev\/null.<br>If your website is HTTPS, you can run the following command:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\ncurl -s -w &#039;Testing Website Response Time for :%{url_effective}\\n\\nLookup Time:\\t\\t%{time_namelookup}\\nConnect Time:\\t\\t%{time_connect}\\nAppCon Time:\\t\\t%{time_appconnect}\\nRedirect Time:\\t\\t%{time_redirect}\\nPre-transfer Time:\\t%{time_pretransfer}\\nStart-transfer Time:\\t%{time_starttransfer}\\n\\nTotal Time:\\t\\t%{time_total}\\n&#039; -o \/dev\/null https:\/\/www.linux.com\n<\/pre><\/div>\n\n\n<p><br>You should get the following output:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\nTesting Website Response Time for :https:\/\/www.linux.com\/\n\nLookup Time:\t\t5.463834\nConnect Time:\t\t5.529342\nAppCon Time:\t\t5.772415\nRedirect Time:\t\t0.000000\nPre-transfer Time:\t5.772548\nStart-transfer Time:\t5.809385\n\nTotal Time:\t\t6.100520\n\n<\/pre><\/div>\n\n\n<p>Testing Website Response Time for :https:\/\/www.howtoforge.com\/<\/p>\n\n\n\n<p>Lookup Time: 0.511<br>Connect Time: 0.564<br>AppCon Time: 0.724<br>Redirect Time: 0.000<br>Pre-transfer Time: 0.724<br>Start-transfer Time: 1.085<\/p>\n\n\n\n<p>Total Time: 1.264<br>If you don&#8217;t want to run a long command every time, you can create a file named curl_test.txt and all required options:<\/p>\n\n\n\n<p>nano curl_test.txt<br>Add the following lines:<\/p>\n\n\n\n<p>time_namelookup: %{time_namelookup}\\n<br>time_connect: %{time_connect}\\n<br>time_appconnect: %{time_appconnect}\\n<br>time_pretransfer: %{time_pretransfer}\\n<br>time_redirect: %{time_redirect}\\n<br>time_starttransfer: %{time_starttransfer}\\n<br>&#8212;&#8212;&#8212;-\\n<br>time_total: %{time_total}\\n<br>Save and close the file then run the following command:<\/p>\n\n\n\n<p>curl -w &#8220;@curl_test.txt&#8221; -o \/dev\/null -s https:\/\/www.howtoforge.com<br>You should get the following output:<\/p>\n\n\n\n<p>time_namelookup: 0.013<br>time_connect: 0.056<br>time_appconnect: 0.160<br>time_pretransfer: 0.160<br>time_redirect: 0.000<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">time_starttransfer: 0.511<\/h2>\n\n\n\n<p>time_total: 0.753<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Curl Output: A brief explanation of each option is shown below: time_connect &#8211; Display the time in seconds from the connect was noticed by curl until the first byte arrived.time_namelookup &#8211; Display the time in seconds it took from the start until the name resolving was completed.time_pretransfer &#8211; Display the time in seconds it took &#8230; <a title=\"How to Test a Slow Website\" class=\"read-more\" href=\"https:\/\/www.qbytes.cloud\/index.php\/2023\/06\/07\/how-to-test-a-slow-website\/\" aria-label=\"Read more about How to Test a Slow Website\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-8871","post","type-post","status-publish","format-standard","hentry","category-administration"],"_links":{"self":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/posts\/8871","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/comments?post=8871"}],"version-history":[{"count":2,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/posts\/8871\/revisions"}],"predecessor-version":[{"id":8874,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/posts\/8871\/revisions\/8874"}],"wp:attachment":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/media?parent=8871"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/categories?post=8871"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/tags?post=8871"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}