django-silk icon indicating copy to clipboard operation
django-silk copied to clipboard

Allowing profiling outside of the request/response cycle

Open mtford90 opened this issue 10 years ago • 10 comments

e.g. a profile should not have to be associated with a request, perhaps by detecting that no request is in process and then committing profile data on the fly if that's the case.

mtford90 avatar Jun 06 '14 18:06 mtford90

How to that? what about profiling django-channels request with silk? @avelis @smaccona

auvipy avatar Mar 14 '17 17:03 auvipy

@auvipy Not sure if django-channels is within the purview of this library. Not against it though. The issue becomes volume. Since channels is meant for websockets it will definitely be high-volume.

avelis avatar Mar 14 '17 18:03 avelis

OK. we can re think about django channels at a later stage.

auvipy avatar Mar 14 '17 18:03 auvipy

+1

fernandolins avatar May 11 '17 22:05 fernandolins

Silk is an awesome tool, it would be great to use it for profiling celery or other async tasks that happen outside the request/response cycle.

ociule avatar Mar 14 '19 16:03 ociule

We have a use case where this feature would be extremely useful. Our application has a lot of long-running asynchronous "tasks" using RQ. Currently, django-silk can't help us because none of the hard work is being done within the scope of a request. Each individual task is very intensive but there are not that many of them, relatively speaking, so it's not a "high volume" problem.

A lot of applications use Celery, also. Same principle. I would love to be able to use Silk to debug our task performance.

dralley avatar Mar 14 '19 16:03 dralley

any prospective API wor workflow do you have in mind how should be the DevUX for the API of that profiler to profile celery/ etc with or outside of django req/resp cycle?

auvipy avatar Mar 30 '19 11:03 auvipy

Hi, Why not give an option in the plugin so that Celery/Rabbit MQ can be used to log the data in Database asynchronously. We face timeouts for requests which have large amounts of data. Is this a suggested strategy? if yes then my team can work on the feature and push it

pranaysharma avatar Aug 10 '19 09:08 pranaysharma

Do not want to necro something, is there a way to achieve this somehow?

jezeniel avatar Nov 18 '22 04:11 jezeniel

FYI I found this GitHub gist that you can use to run django-silk against arbitrary functions not wrapped in APIs. This was a good-enough workaround for me to debug some performance challenges, although it would be fantastic to see something supported by django-silk in the future.

OscarVanL avatar Mar 24 '24 08:03 OscarVanL