简体   繁体   English

如何在 Google App Engine 上获取 Python FastAPI 脚本的 CPU 和 Memory 使用情况

[英]How to get CPU & Memory usage for a Python FastAPI script on Google App Engine

I'm running a FastAPI script on Google App Engine, is there a way to get the CPU & Memory usage for a single request made?我在 Google App Engine 上运行 FastAPI 脚本,有没有办法为单个请求获取 CPU 和 Memory 使用情况? I'm trying to calculate how many requests a single instance can take.我正在尝试计算单个实例可以接受多少个请求。

No, you can't and that is the wrong thing to measure anyway.不,你不能,无论如何衡量都是错误的。

You want to run load testing where you have a script that does X requests/second to your website over a period of time to see what your website can handle.您想要运行负载测试,其中您有一个脚本在一段时间内对您的网站执行 X 次请求/秒,以查看您的网站可以处理什么。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM