Skip to content

A docker image for running the wrk2 performance testing tool.

License

Notifications You must be signed in to change notification settings

haydenjeune/wrk2-docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

wrk2-docker

This image contains the giltene/wrk2 CLI tool for performance testing. I have created this image as the other wrk2 images I found are far bigger than they need to be (most were ~200MB). This image contains only the things that you actually need to run wrk2, so is quite small at ~6MB.

Usage

This image is built from master and accessible on dockerhub at haydenjeune/wrk2. To pull:

docker pull haydenjeune/wrk2:latest

The entrypoint for this image is the wrk2 binary.

To run tests with 1 thread, 5 connections, 10 requests per second, for 15s, with a request defined in request.lua (as below)

$ cat request.lua
wrk.method = "POST"
wrk.body   = '{ ... some request JSON }'
wrk.headers["Content-Type"] = "application/json"
docker run -rm -v "$(pwd)"/request.lua:/data/request.lua haydenjeune/wrk2:latest -t1 -L -c5 -R10 -d15s -s /data/request.lua http://localhost/your_request_endpoint

Note that the request.lua file is mounted inside the /data directory of the container via bind mount.

About

A docker image for running the wrk2 performance testing tool.

Topics

Resources

License

Stars

Watchers

Forks