Contributors mailing list archives
Re: Python Profilingby
Vauxoo, Moisés López Calderón
FYI we have created a module that patchs odoo to start a cProfile and modify the cursor to enable postgresql logs OnDemand from odoo button.
After that gets cProfile report and postgesql.log report analysis to odoo records:- https://github.com/OCA/server-tools/tree/11.0/profiler
The bad point is that it doesn't support odoo using more than one worker.
Now, I'm creating a new app using pyflame to run with odoo using more than one worker.
The bad point is that its require "root" access then an odoo module is not a good idea.
Currently, we are running these tools manually from live production in order to get a real analysis since that there are a lot of corner cases we can't reproduce from testing environments.
The good point for pyflame and postgresql.log is that we don't require restart odoo service to work and supports multi-workers.
El lun., 29 jul. 2019 a las 11:27, David Arnold (<firstname.lastname@example.org>) escribió:
Hi Miku, Could you probably just share a gist quickly?On Mon, Jul 29, 2019 at 9:16 AM Miku Laitinen <email@example.com> wrote:I've done a /metrics endpoint for Odoo and I'm using it with Prometheus. I guess I could contribute it to OCA if someone tells me which repository to target. server-tools?Miku LaitinenAVOIN.SYSTEMS+358 44 239 1985On Thu, Jul 25, 2019 at 7:32 PM David Arnold <firstname.lastname@example.org> wrote:>How do you plan to use those profiling tools along with containers andProbably Odoo can be patched to return profiling information on a metrics endpoint for Prometheus to scrape..I have a Prometheus metrics patch in the making with just standard odoo metrics (no real profiling).I'm pretty confident with Odoo patching (as in git patches) for a while now.It's like creativity being released after a long jail sentence :-)So there should be a prometheus branch shortly here: https://github.com/xoe-labs/odoo-devOn Wed, Jul 24, 2019 at 9:51 AM Jairo Llopis <email@example.com> wrote:Interesting. I didn't know about Austin and it looks quite good. Pyflame is lacking Python 3.7 support for too long already.Py-spy also works pretty fine, as I used it in the past and it outputs directly an interactive SVG that you can play with in a browser. It still lacks a raw output format that you can upload to https://www.speedscope.app/, but it's on the roadmap.How do you plan to use those profiling tools along with containers and k8s?El mar., 23 jul. 2019 a las 19:26, David Arnold (<firstname.lastname@example.org>) escribió:Hi All,Buschfunk!This might look interesting to some of you:On topic for statistical profiling.Best Regards,David A.