Coder Social home page Coder Social logo

http-perftrace's Introduction

http-perftrace

Experiment with the Go httptrace library building a simple CLI tool to output HTTP performance for a given URL. It's basically like siege or something, but written in Go, and much much simpler.

TODO

  • Double check hooks in httptrace.ClientTrace and their correct use in this tool
  • Provide some more useful output at the end, maybe 95th percentiles for example
  • Add colours
  • Add interval between requests (or random interval)
  • Add linter, tests, etc

Installation

go get github.com/halkyon/http-perftrace

Usage

$ http-perftrace -u https://www.google.com [-c concurrency] [-d duration]

Example

$ http-perftrace -u https://www.google.com -c 1 -d 1s
Running for 1s with 1 concurrent workers

HTTP/2.0 200 OK - DNS: 3.9891ms, TCP: 53.363ms, TLS: 170.0507ms, Server processing: 187.4985ms, Total: 416.896ms
HTTP/2.0 200 OK - DNS: 997.3µs, TCP: 61.8344ms, TLS: 152.6072ms, Server processing: 191.4877ms, Total: 406.9266ms

Test ended. 2 requests made

Average DNS lookup: 2.4932ms
Average TCP connect: 57.5987ms
Average TLS handshake: 161.32895ms
Average server processing: 189.4931ms
Average round trip: 411.9113ms

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.