Giter Club home page Giter Club logo

curl-average-timings's Introduction

cURL Average Timings

This is a simple bash script to get the averages of various website response timings using cURL.

Requirements

sudo apt-get install curl  #cURL command line tool
sudo apt-get install bc    #bc command line calculator

How to use

git clone [email protected]:chentda/curl-average-timings.git

cd curl-average-timings

./curl_average_timings.sh <"URL for website"> <Number of iterations as integer>

Example

./curl_average_timings.sh "https://www.github.com" 10

Averages of response timings:

   time_namelookup: .01380
      time_connect: .19130
   time_appconnect: .88800
  time_pretransfer: .88810
     time_redirect: 0
time_starttransfer: 1.07660
                    --------
        time_total: 1.07670

cURL Timings Definitions (According to cURL's manual page)

  • namelookup: The time, in seconds, it took from the start until the name resolving was completed.
  • connect: The time, in seconds, it took from the start until the TCP connect to the remote host (or proxy) was completed.
  • appconnect: The time, in seconds, it took from the start until the SSL/SSH/etc connect/handshake to the remote host was completed.
  • pretransfer: The time, in seconds, it took from the start until the file transfer was just about to begin. This includes all pre-transfer commands and negotiations that are specific to the particular protocol(s) involved.
  • redirect: The time, in seconds, it took for all redirection steps include name lookup, connect, pretransfer and transfer before the final transaction was started. time_redirect shows the complete execution time for multiple redirections.
  • starttransfer: The time, in seconds, it took from the start until the first byte was just about to be transferred. This includes time_pretransfer and also the time the server needed to calculate the result.
  • total: The total time, in seconds, that the full operation lasted. The time will be displayed with millisecond resolution.

curl-average-timings's People

Contributors

chentda avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.