Skip to content

amansharma612/http-load-generator

 
 

Repository files navigation

http-load-generator

A simple closed loop load generator for HTTP requests to test servers.

The load generator only supports HTTP/1.0 and GET requests.

Usage

Set the following configuration values in http_client.hh:

  • HOST: The host to send requests to.
  • URL: The URL to send requests to.
  • PORT: The port to send requests to.
  • SANITY_CHECK: The expected response head.
  • OUTPUT: The expected response body.
  • FAULT_EXIT: 0 for tolerant, 1 for strict.

Then, set the following environment variables in run_generator.sh:

  • USER_COUNT: The number of users to simulate.
  • THINK_TIME: The think time between requests.
  • TEST_DURATION: The duration of the test in seconds.
  • CPU: The CPU to run the load generator on.

CPU is the CPU number, not the CPU name. You can find the CPU number by running lscpu.

Finally, to run the load generator, use the following command:

bash ./run_generator.sh

The use the loadgenerator on the same device as the HTTP server, use mutual exclusive CPUs. Use taskset to set the CPU affinity of the http server and the load generator.

About

Simple HTTP load generator.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 71.0%
  • Python 13.4%
  • Shell 13.2%
  • Makefile 2.4%