jpignata / httping

Small Ruby port of httping - a utility to measure HTTP GET response time

This URL has Read+Write access

jpignata (author)
Sat Jan 02 06:24:30 -0800 2010
commit  6a26e1848beaffcd68530d22372adfa5a17b4db7
tree    cee4979d86f782b44d716a59199c7fdb402d4a35
parent  0f42b08ac2587b926b07b852b34d8f14ab4a7153
name age message
file .gitignore Mon Dec 28 19:31:45 -0800 2009 Add gitignore [jpignata]
file LICENSE Sun Dec 27 19:44:59 -0800 2009 Update LICENSE year [jpignata]
file README.md Fri Jan 01 18:14:01 -0800 2010 Add cookie support [jpignata]
file Rakefile Sun Nov 01 16:20:23 -0800 2009 Properly spell referrer in attr_writer [jpignata]
file VERSION Sun Dec 27 21:11:07 -0800 2009 Version bump to 1.3.0 [jpignata]
directory bin/ Thu Oct 29 13:53:17 -0700 2009 Extract classes into separate files [jpignata]
directory lib/ Fri Jan 01 18:14:01 -0800 2010 Add cookie support [jpignata]
directory spec/ Sat Jan 02 06:24:30 -0800 2010 Update spec to reflect small summary output change [jpignata]
README.md

HTTPing.rb

HTTPing.rb is a utility to measure web service response time. This is a Ruby port of HTTPing (http://www.vanheusden.com/httping/).

Bugs, Features, Feedback

Tickets can be submitted by via GitHub issues.

Example Usage

jpignata@populuxe:~$ httping --count 10 --user-agent "HTTPinger" http://www.google.com
5 kb from http://www.google.com/: code=200 msg=OK time=51 msecs
5 kb from http://www.google.com/: code=200 msg=OK time=61 msecs
5 kb from http://www.google.com/: code=200 msg=OK time=74 msecs
5 kb from http://www.google.com/: code=200 msg=OK time=48 msecs
5 kb from http://www.google.com/: code=200 msg=OK time=106 msecs
5 kb from http://www.google.com/: code=200 msg=OK time=51 msecs
5 kb from http://www.google.com/: code=200 msg=OK time=52 msecs
5 kb from http://www.google.com/: code=200 msg=OK time=50 msecs
5 kb from http://www.google.com/: code=200 msg=OK time=59 msecs
5 kb from http://www.google.com/: code=200 msg=OK time=60 msecs

--- http://www.google.com/ httping.rb statistics ---
10 GETs transmitted
round-trip min/avg/max = 48 msecs/61 msecs/106 msecs

Command-line Options

Usage: httping [options] uri
    -c, --count NUM                  Number of times to ping host
    -d, --delay SECS                 Delay in seconds between pings (default: 1)
    -f, --flood                      Flood ping (no delay)
    -j, --json                       Return JSON results
    -q, --quick                      Ping once and return OK if up
    -a, --audible                    Beep on each ping
    -u, --user-agent STR             User agent string to send in headers
    -r, --referrer STR               Referrer string to send in headers
    -C, --cookie NAME=VALUE          Add cookie to the request
    -v, --version                    Display gem version
    -h, --help                       Display this screen

Installation

jp@populuxe:~$ gem install httping

Requirements

  • FakeWeb (in order to run the specs)

LICENSE:

(The MIT License)

Copyright (c) 2009-2010 John Pignata

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Todo

  • Authentication
  • IPv6 support