Skip to content

Index

๐Ÿ‹๏ธโ€โ™‚๏ธ WRK Load Testing Guideยถ

โš™๏ธ Installationยถ

sudo apt-get install zip
git clone https://github.com/wg/wrk.git
cd wrk
make
sudo cp wrk /usr/local/bin/
cd ..
rm -rf wrk
brew install wrk

Verify Installation

Run wrk --help to confirm successful installation.

๐Ÿงช Test Environment Setupยถ

  1. Start required services:
    • Run docker-compose up to launch dependencies.
    • Checkout and run the mock/loadTest branch locally to create 500 users.
    • Start smpp-adapter using the mock/sia_test branch for immediate responses to sia-gateway.

User Creation

The mock/loadTest branch automates user creation for benchmarking.

๐Ÿšฆ Running Benchmarksยถ

Example: Test with 1,000 users, 10 threads, for 10 seconds.

wrk -c1000 -t10 -d10s -s ./sia-api.lua --latency http://localhost:8100
wrk -c1000 -t10 -d10s -s sia-api.lua --latency http://localhost:8084

Script Usage

The sia-api.lua script customizes WRK requests for your API.

๐Ÿ“ˆ Resultsยถ

  • WRK outputs latency, throughput, and detailed statistics.
  • Review logs and monitoring dashboards for deeper analysis.

Resource Usage

High concurrency may impact local system performance. Monitor CPU and memory during tests.