简体   繁体   English

Google Cloud Profiler 显示 [未知 - 无 Python 线程状态]

[英]Google Cloud Profiler showning [Unknown - No Python thread state]

Today I started using Google Cloud Profiler for a Python3 project running on Google App Engine Standard Environment.今天,我开始将Google Cloud Profiler用于在 Google App Engine 标准环境上运行的 Python3 项目。

I expected to see references to my functions in the resulting flame graph, I spot only a [Unknown - No Python thread state] in CPU time profile.我希望在生成的火焰图中看到对我的函数的引用,我在 CPU 时间配置文件中只发现了一个[Unknown - No Python thread state]

I followed these instructions .我按照这些说明进行操作。

I don't understand if this is the expected result:我不明白这是否是预期的结果:

在此处输入图像描述

在此处输入图像描述

Where are you calling the profiler start function?你在哪里调用分析器开始 function? The profile start function should be called once and as early as possible.配置文件开始 function 应尽早调用一次。 If you already haven't move the profile initialization code to Django's urls.py file see this SO post.如果您尚未将配置文件初始化代码移动到 Django 的 urls.py 文件,请参阅此SO帖子。 Then load test your app.然后负载测试您的应用程序。

If you are using uWSGI, there are some limitations you need to be aware about which is mentioned in the Profiler documentation如果您使用的是 uWSGI,则需要注意 Profiler 文档中提到的一些限制

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

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