Skip to content

proffapt/rewrk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Contributors Forks Stargazers Issues MIT License LinkedIn

rewrk

Reworked wrk - Managed HTTP benchmarking tool
Request Feature | Report Bug

Table of Contents

About The Project

Rewrk, a wrk HTTP Benchmarking Wrapper Script, is designed to abstract the complexity of managing wrk processes. It provides functionality for both single benchmarking test and sequential benchmarking as batch operations, provided via configuration file (.json), making load testing and benchmarking of HTTP servers straightforward.

(back to top)

Supports:

  1. OS(s)
    • MacOS[BSD based]
    • any *nix[GNU+Linux and Unix]

(back to top)

Getting Started

To set up a local instance of the application, follow the steps below.

Install using Homebrew

brew tap proffapt/brewtap
brew install rewrk

Manual Installation

Prerequisites

The following dependencies are required to be installed for the project to function properly:

  • wrk

    Follow the installation instructions for your platform for wrk.

  • jq

    sudo apt install jq   # Ubuntu/Debian
    sudo yum install jq   # CentOS/Fedora
    brew install jq       # macOS (HomeBrew)

(back to top)

Installation

Now that the environment has been set up and configured to properly compile and run the project, the next step is to install and configure the project locally on your system.

  1. Clone the repository
    git clone https://github.com/proffapt/rewrk.git
  2. Make the script executable
    cd ./rewrk
    chmod +x ./rewrk
  3. Execute the script
    ./rewrk

(back to top)

Usage

Usage: ./rewrk COMMAND [OPTIONS]

A wrapper script to manage wrk HTTP benchmarking tool

Commands:
  status                    Show the status of wrk process
  start ARGS                Start a single wrk instance with specified parameters
    Arguments:
      threads               Number of threads to use
      connections           Number of connections to keep open
      duration              Duration of the test (e.g., 30s, 1m, 1h)
      url                   Target URL
      [timeout]             Optional: Request timeout (default: 30s)

  stop                      Stop the running wrk process

  bstart ARGS               Start batch wrk processes using a configuration file
    Arguments:
      load_pattern_file     JSON file containing load patterns
      url                   Target URL
      [timeout]             Optional: Request timeout (default: 30s)

  bstop                     Stop all wrk processes in the batch

Example JSON load pattern file format:
{
  [
    {
      "threads": 1,
      "connections": 2,
      "duration": "1h"
    },
    {
      "threads": 1,
      "connections": 1,
      "duration": "1h"
    }
  ]
}

Examples:
  ./rewrk status
  ./rewrk start 1 2 10m http://example.com/load/1
  ./rewrk bstart load.example.json http://example.com/load/1
  ./rewrk stop
  ./rewrk bstop

(back to top)

Contact

📫 Arpit Bhardwaj ( aka proffapt ) - proffapt's Twitter proffapt's Telegram proffapt's LinkedIn proffapt's mail proffapt's forum for cybernity

(back to top)

Acknowledgments

(back to top)

Additional documentation

(back to top)

About

Reworked wrk - Managed HTTP benchmarking tool

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Contributors

Languages