GithubHelp home page GithubHelp logo

http-tester's Introduction

HTTP Load Tester

Test HTTP endpoints by load and measuring performance metrics. Currently only supports GET, HEAD, OPTIONS requests.

Usage

python tester.py <address> [-x HTTP_METHOD] [-t DURATION] [-to TIMEOUT] [-qps RATE_LIMIT] [-q]

Arguments

  • <address>: Address of the endpoint to test.
  • -x, request_method HTTP_METHOD: Which HTTP request method to send. (default: GET).
  • -t, --duration DURATION: Duration of the test in seconds (default: 5).
  • -to, --timeout TIMEOUT: Timeout per request in seconds (default: -1 for total duration).
  • -qps, --rate_limit RATE_LIMIT: Rate limiting in queries per second (default: None for random relay).
  • -q, --quiet: Suppress output to console (e.g., only save to file).

Examples

  1. Test an endpoint for 10 seconds with default settings:

    python tester.py github.com -t 10
  2. Test an endpoint for 5 seconds with a rate limit of 50 queries per second:

    python tester.py github.com -t 5 -qps 50
  3. Test an endpoint for 1 minute with a timeout of 2 seconds per request and suppress output:

    python http_load_tester.py github.com -t 60 -to 2 -q

Outputs from Makefile Tests

python tester.py http://www.microsoft.com -t 1 -qps 100 -o -f results-ms

**Summary**
    Address: http://www.microsoft.com
HTTP Method: GET
   Duration: 1s
  QPS Limit: 100

**Results**
 Success:  98/100
 Failure:   2/100

**Latencies**
 Min: 0.40906381607055664
 Max: 1.9798245429992676
 Avg: 1.1469733106846711
 StD: 0.32635958637489465

Warning -- adding extension: results-ms(.json)
python tester.py http://www.google.com -t 1 -qps 100 -o -f results-g -x HEAD

**Summary**
    Address: http://www.google.com
HTTP Method: HEAD
   Duration: 1s
  QPS Limit: 100

**Results**
 Success: 100/100
 Failure:   0/100

**Latencies**
 Min: 0.13163399696350098
 Max: 0.17531871795654297
 Avg: 0.16290982246398925
 StD: 0.010312770109600166

Warning -- adding extension: results-g(.json)
python tester.py http://cslab.cs.toronto.edu -t 1 -to 1 -qps 100 -o

**Summary**
    Address: http://cslab.cs.toronto.edu
HTTP Method: GET
   Duration: 1s
    Timeout: 1s
  QPS Limit: 100

**Results**
 Success:   0/100
 Failure: 100/100

**Latencies**
None recorded. Maybe timed out?

http-tester's People

Contributors

rhubarbwu avatar

Watchers

 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.