1

Today I started using Google Cloud Profiler for a Python3 project running on Google App Engine Standard Environment.

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.

I followed these instructions.

I don't understand if this is the expected result:

enter image description here

enter image description here

neurino
  • 11,500
  • 2
  • 40
  • 63

1 Answers1

1

Where are you calling the profiler start function? The profile start function should be called once and as early as possible. If you already haven't move the profile initialization code to Django's urls.py file see this SO post. 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

MaryM
  • 164
  • 4
  • Hello @MaryM, it's a Flask app, the profiler start function call is at the very top of my module `__init__.py`. Executed before it there's only `main.py` which is a simply `from my_module import app` – neurino Jun 12 '20 at 12:58