How can I get metrics like memory consumption and sql requests made on local dev setup

I want to run some long running tasks. Basically generating reports for courses with large amount of users. I am trying to see how system performs (memory and time) as the number of records grow and how many queries are made to the DB?

In production environment you might get it with New Relic but are there any options available in local dev setup?

Hello @Ahmed_Zubair,

In the development environment, you can use the Django Debug Toolbar to check about no of queries executed, and CPU & RAM usage for a page to load.

Django Debug Toolbar comes pre-installed with Open edX and is enabled on the development environment.

If you’re using devstack, there’s a make stats that shows a live view of memory and CPU usage of the various containers. Maybe that would help?

(It just runs docker stats --format "table {{.Name}}\t{{.CPUPerc}}\t{{.MemUsage}}" which I assume would work with Tutor as well.)

1 Like