Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Simple load testing tool with real-time updated histogram of request timings

License

NotificationsYou must be signed in to change notification settings

s-macke/SlapperX

 
 

Repository files navigation

Slapper is a simple load testing tool written in Go, which can send HTTP requests to your server and display the results in a histogram. It provides basic performance metrics, such as request rate, response times, and error rates.

slapper

Features

  • Basic performance metrics
  • Histogram visualization of response time distribution
  • Adjustable request rate, timeout, and worker count
  • Supports multiple request targets
  • Configurable ramp-up time for gradually increasing request rate

Interface

interface

Installation

Justdownload a release or install SlapperX via

go install github.com/s-macke/slapperx@latest

Installation (Manual)

To use Slapper, you need to have Go installed on your machine. You can download Go fromthe official website.

After installing Go, clone this repository and build the binary:

git clone https://github.com/s-macke/SlapperX.gitcd SlapperXgo build

Usage

Here is an example of how to use Slapper:

./slapper -targets targets.http -workers 8 -timeout 30s -rate 50 -minY 0ms -maxY 100ms -rampup 10s

Flags

  • -targets: Targets file containing the REST request data to be tested in the.http format..
  • -workers: Number of workers sending requests concurrently (default 50).
  • -timeout: Request timeout duration (default 30 seconds).
  • -rate: Desired request rate per second (default 50).
  • -minY: Minimum Y-axis value for the histogram (default 0 milliseconds).
  • -maxY: Maximum Y-axis value for the histogram (default 100 milliseconds).
  • -rampup: Duration to ramp up to the desired request rate (default 0 seconds).

Keybindings

  • q: Quit the program.
  • r: Reset the statistics.
  • k: Increase request rate by 10
  • j: Decrease request rate by 10
  • Ctrl+C: Quit the program.

Targets syntax

The targets file follows the same format as the Jetbrains.http files.You can find the full specification in theJetBrains documentation.

Here is an example:

GET https://api.example.com/usersAuthorization: Bearer your_token_hereContent-Type: application/json###POST https://api.example.com/usersAuthorization: Bearer your_token_hereContent-Type: application/json{  "name": "John Doe",  "email": "john.doe@example.com"}###PUT https://api.example.com/users/123Authorization: Bearer your_token_hereContent-Type: application/json{  "email": "updated.email@example.com"}

In this example, we have three HTTP requests:

  1. AGET request to retrieve a list of users.
  2. APOST request to create a new user.
  3. APUT request to update an existing user's email.

Each request includes headers, such asAuthorization andContent-Type, and uses the### separator to distinguish between requests.

Contributing

Contributions are welcome! If you have found a bug or have a feature request, please create an issue or submit a pull request.

License

This project is released under theMIT License.

About

Simple load testing tool with real-time updated histogram of request timings

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go97.3%
  • Gnuplot1.6%
  • Shell1.1%

[8]ページ先頭

©2009-2025 Movatter.jp