Tuesday, April 3, 2012

Re: Profiling Django (WAS Django database-api)

On Tue, Apr 3, 2012 at 8:21 AM, Andre Terra <andreterra@gmail.com> wrote:
> I have some complex and database intensive asynchronous tasks running under
> celery which take a LONG time to complete and I'd just love to be able to
> keep track of the queries they generate in order to optimize and possibly
> remove the biggest bottlenecks.

the easiest would be to write detailed logs, which _can_ be analysed
in real time, not only 'after the fact'.

my second idea would be to hack the log output so instead of writing
to a file, it would store messages (probably with some structure) to
some comfortable database. I'd use Redis, but i guess MongoDB or even
an SQL-based DB could work too. then you can easily filter and
aggregate times according to task type, when it happened, etc.

--
Javier

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate