Async Techniques and Examples in Python Transcripts
Chapter: asyncio-based web frameworks
Lecture: Load testing web apps with wrk

Login or purchase this course to watch this video and the rest of the course contents.
0:00 So I said that now you have better scalability. You have better performance. Do you take my word for it? I wouldn't. I didn't actually.
0:09 I said, okay, I'm going to convert this to Quart. Now, unless I see an improvement I'm actually going to not even cover it in this course.
0:16 Spoiler alert, it's going to be better. But, how do you know? You want to do proper load testing. So, here's a tool called wrk, and it describes itself
0:26 as a modern HTTP benchmarking tool. And you can see the URL right there at the bottom. So, you can go get this and install it
0:32 and then use this to test your web app. Well, how do you get it? If you happen to be on macOS you're in luck. You can use Homebrew.
0:40 If you don't know what Homebrew is, check it out at brew.sh. It's really awesome. That's the way I manage lots of things like Python
0:46 and Node and all those types of things on my machine. MongoDB, for example. Install them and upgrade them with Homebrew.
0:52 So, wrk can also be installed with Homebrew. brew install wrk. Boom, done. Now I know the stats on OSs that people use to work with Python.
1:01 OSX, as they have here, or macOS same thing, combine it, and it's been renamed basically is a very small percentage.
1:08 Even though it might appear that, you know go to a conference, everyone has a Mac I think it's like 15 to 20%.
1:13 So that leaves a whole bunch of other folks who may want to use wrk. How do they get it? Well on Linux, on Ubuntu, you can go
1:19 and check it out and compile it from source. I don't really like that answer. I don't really like that as an option
1:24 but it's better than you don't get it. So, you can check it out and compile it. On Windows, the answer is a little bit less good
1:31 than that not so good answer. And that is on Windows 10 you can get wrk because you have the Ubuntu Subsystem on Windows which you can turn on
1:41 and then you can get wrk source and compile it there. Okay, so these are your options you have for the other OSs.
1:48 But you don't actually have to run this. You can just look at the numbers that I'm going to show you in the next video and you can basically
1:54 do the takeaways for yourself. But if you want to try it for yourself then here is a tool that I used and here's how you get it and install it.


Talk Python's Mastodon Michael Kennedy's Mastodon