httpstat: Simple cURL Stats

By  on  

There are a lot of tools out there that do great, advanced things but present them as well as they could be presented.  I wont knock cURL for anything -- it's an amazing tool many of us can't live without;  what I will say, however, is that it's nice having tools on top of cURL for better presentation or extended functionality.

I recently discovered httpstat, which is a single python file which (simply) graphically displays request event timing, from DNS lookup to content transfer:

python httpstat.py https://davidwalsh.name/page/1

httpstat

What you get in the end is an ASCII table showing how long each step took.  Of big interest to me is the "server processing" step -- if this number is large, you can probably do some things to your code or server to speed things up.

Grab httpstat and check out your site speed -- you might not be happy with the numbers!

Recent Features

  • By
    fetch API

    One of the worst kept secrets about AJAX on the web is that the underlying API for it, XMLHttpRequest, wasn't really made for what we've been using it for.  We've done well to create elegant APIs around XHR but we know we can do better.  Our effort to...

  • By
    Regular Expressions for the Rest of Us

    Sooner or later you'll run across a regular expression. With their cryptic syntax, confusing documentation and massive learning curve, most developers settle for copying and pasting them from StackOverflow and hoping they work. But what if you could decode regular expressions and harness their power? In...

Incredible Demos

  • By
    Using Opacity to Show Focus with jQuery

    A few days back I debuted a sweet article that made use of MooTools JavaScript and opacity to show focus on a specified element. Here's how to accomplish that feat using jQuery. The jQuery JavaScript There you have it. Opacity is a very simple but effective...

  • By
    Image Data URIs with PHP

    If you troll page markup like me, you've no doubt seen the use of data URI's within image src attributes. Instead of providing a traditional address to the image, the image file data is base64-encoded and stuffed within the src attribute. Doing so saves...

Discussion

  1. Hi David, the utility is also available via Homebrew for Mac users.

    Cheers.

  2. Loris

    Off Topic: what is the colour scheme of the terminal in the screenshot?

    • David

      Looks like solarized with a darker background color.

  3. Renok

    There is also a node module wrapper for this up on NPM, works like a charm.

    https://www.npmjs.com/package/httpstat

  4. Awesome script! I’ve always relied on speedgun.io to generate similar stats, but it needs phantomjs.

    Sometimes I just need download info, and this looks like a great option.

Wrap your code in <pre class="{language}"></pre> tags, link to a GitHub gist, JSFiddle fiddle, or CodePen pen to embed!