You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Can you reproduce the bug with PYTHONASYNCIODEBUG in env?: Yes
Hi, I wrote a project using uvloop, and I wanted to start profiling to see what methods take long. From what I am aware of cProfile, etc.. don't support asyncio very well (maybe I am wrong?, is there something advised for profiling asyncio code?)
I noticed in the documentation of python that by doing set_debug and reducing slow_callback_duration I can see what methods are taking long. But when using uvloop, I don't get all the information. I saw it was discussed in python/asyncio#105 and fixed. (Probably in the basic loop, it was fixed.)
if I use uvloop as my event loop I get this message:
Executing <Handle <TaskSendMethWrapper object at 0x1060e7860> created at /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/asyncio/tasks.py:512> took 0.205 seconds
If I comment out the uvloop and use the standard loop I get:
Executing <Task finished coro=<slow_func() done, defined at Launcher.py:13> result=None created at /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/asyncio/base_events.py:446> took 0.206 seconds
This helps pinpoint what function is doing the problem.
Thanks,
And sorry for the long description.
The text was updated successfully, but these errors were encountered:
PYTHONASYNCIODEBUG
in env?: YesHi, I wrote a project using uvloop, and I wanted to start profiling to see what methods take long. From what I am aware of cProfile, etc.. don't support asyncio very well (maybe I am wrong?, is there something advised for profiling asyncio code?)
I noticed in the documentation of python that by doing set_debug and reducing slow_callback_duration I can see what methods are taking long. But when using uvloop, I don't get all the information. I saw it was discussed in python/asyncio#105 and fixed. (Probably in the basic loop, it was fixed.)
Code Example:
if I use uvloop as my event loop I get this message:
Executing <Handle <TaskSendMethWrapper object at 0x1060e7860> created at /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/asyncio/tasks.py:512> took 0.205 seconds
If I comment out the uvloop and use the standard loop I get:
Executing <Task finished coro=<slow_func() done, defined at Launcher.py:13> result=None created at /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/asyncio/base_events.py:446> took 0.206 seconds
This helps pinpoint what function is doing the problem.
Thanks,
And sorry for the long description.
The text was updated successfully, but these errors were encountered: