Notive elevator out of order

If like me you installed a Linux Distro on Windows 10 and then just did nothing with it, it would behoove us to remember that there is a very mature ecosystem of tooling that can improve your life as a .NET developer. I was recently attempting to create some demo code that would fail under load and I wanted a quick and intuitive way to create the load. There a few tools that could do this in the Windows world but the ones I was aware were not command line tools, and that is when I happened upon wrk.

wrk is a HTTP benchmarking tool which is capable of generating a bunch of traffic even when running on a single multi-core CPU. In this example I am running a bench mark for 30 seconds, using 12 threads, and keeping 400 HTTP connections open:

wrk -t12 -c400 -d30s http://127.0.0.1:8080/index.html

After installing my Linux distro of choice (Ubuntu in this case) from the Windows 10 store I executed the following sequence of commands in bash:

sudo apt-get install build-essential libssl-dev git -y 
git clone https://github.com/wg/wrk.git wrk 
cd wrk 
sudo make 
# move the executable to somewhere in your PATH, ex: 
sudo cp wrk /usr/local/bin 

I will always be a Windows dev but I have to remember to take advantage of a mature tooling ecosystem that can exist alongside your Windows 10 tooling! Did I mention that wrk is Open Source and available for review on GitHub.



Comment Section

Comments are closed.