课程: Google Cloud Professional Machine Learning Engineer Cert Prep

免费学习该课程!

今天就开通帐号,24,700 门业界名师课程任您挑!

Load testing with Locust

Load testing with Locust

Locust is an open source load testing tool that can actually do millions of simultaneous users. Great little app here that we can play around with to test our code. And this is an important part of doing production systems is to do load testing to verify that the behavior can be replicated in production. So let's go over to a GitHub Codespace environment here, I have this simple microservice that can run in Kubernetes, but I'm going to for now, just run it locally. And if I go through here and I just say python main, I could run the app, right? So we know that that'll work and it'll launch the application. But what I want to do first is I want to create a Locust file. And if we go ahead and we look at the application here and I do a touch and I say locustfile.py, we can actually put in our load test very simply inside of here. So I'm going to grab some boilerplate code and change it a little bit here. And so if we go through…

内容