Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Allowing profiling outside of the request/response cycle #3

Open
mtford90 opened this issue Jun 6, 2014 · 10 comments
Open

Allowing profiling outside of the request/response cycle #3

mtford90 opened this issue Jun 6, 2014 · 10 comments

Comments

@mtford90
Copy link
Collaborator

mtford90 commented Jun 6, 2014

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.

@auvipy
Copy link
Contributor

auvipy commented Mar 14, 2017

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

@avelis
Copy link
Collaborator

avelis commented Mar 14, 2017

@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.

@auvipy
Copy link
Contributor

auvipy commented Mar 14, 2017

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

@fernandolins
Copy link

+1

@ociule
Copy link

ociule commented Mar 14, 2019

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.

@dralley
Copy link

dralley commented Mar 14, 2019

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.

@auvipy
Copy link
Contributor

auvipy commented Mar 30, 2019

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?

@pranaysharma
Copy link

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

pablodiazgutierrez pushed a commit to appfluence/django-silk that referenced this issue Oct 18, 2020
@jezeniel
Copy link

jezeniel commented Nov 18, 2022

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

@OscarVanL
Copy link

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.

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

9 participants