Skip to content

Instantly share code, notes, and snippets.

@seanjensengrey
Created April 4, 2018 18:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save seanjensengrey/e3a2449044d8e96592adbd9d3638b517 to your computer and use it in GitHub Desktop.
Save seanjensengrey/e3a2449044d8e96592adbd9d3638b517 to your computer and use it in GitHub Desktop.
wrk2 in a docker container
#!/bin/bash
set -x
mkdir build-temp
pushd build-temp
git clone https://github.com/giltene/wrk2
docker run --rm -v $PWD/wrk2:/wrk2 sjg/builder:v1 /bin/bash -c 'cd wrk2; make'
popd
docker build -t sjg/wrk2:v2 .
FROM ubuntu:16.04
RUN apt-get update && \
apt install --yes \
build-essential \
cmake \
git \
libssl-dev \
pkgconf \
python-pip \
python2.7 \
python2.7-dev \
tcl \
tcl-tclreadline \
vim-nox \
wget \
zlib1g-dev
docker run -it sjg/wrk2:v2 ./wrk -R 50 -d 10 http://172.16.220.1:8080/build-temp/wrk2/README.md
Running 10s test @ http://172.16.220.1:8080/build-temp/wrk2/README.md
2 threads and 10 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 7.41ms 3.21ms 20.29ms 72.80%
Req/Sec -nan -nan 0.00 0.00%
502 requests in 10.01s, 17.37MB read
Requests/sec: 50.15
Transfer/sec: 1.74MB
FROM ubuntu:16.04
MAINTAINER Sean Jensen-Grey <seanj@xyke.com>
RUN apt-get update && apt-get install libssl1.0.0
COPY build-temp/wrk2/wrk /wrk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment