Contributors mailing list archives

contributors@odoo-community.org

Avatar

Re: Python Profiling

by
Vauxoo, Moisés López Calderón
- 29/07/2019 18:59:14
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 (<dar@xoe.solutions>) escribió:
Hi Miku, Could you probably just share a gist quickly? 

On Mon, Jul 29, 2019 at 9:16 AM Miku Laitinen <miku@avoin.systems> 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 Laitinen
AVOIN.SYSTEMS
+358 44 239 1985


On Thu, Jul 25, 2019 at 7:32 PM David Arnold <dar@xoe.solutions> wrote:
>How do you plan to use those profiling tools along with containers and 

Probably 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-dev

On Wed, Jul 24, 2019 at 9:51 AM Jairo Llopis <jairo.llopis@tecnativa.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 (<dar@xoe.solutions>) escribió:
Hi All,

Buschfunk!

This might look interesting to some of you:



On topic for statistical profiling.

Best Regards,
David A.

_______________________________________________
Mailing-List: https://odoo-community.org/groups/contributors-15
Post to: mailto:contributors@odoo-community.org
Unsubscribe: https://odoo-community.org/groups?unsubscribe



--
Jairo Llopis

_______________________________________________
Mailing-List: https://odoo-community.org/groups/contributors-15
Post to: mailto:contributors@odoo-community.org
Unsubscribe: https://odoo-community.org/groups?unsubscribe

_______________________________________________
Mailing-List: https://odoo-community.org/groups/contributors-15
Post to: mailto:contributors@odoo-community.org
Unsubscribe: https://odoo-community.org/groups?unsubscribe

_______________________________________________
Mailing-List: https://odoo-community.org/groups/contributors-15
Post to: mailto:contributors@odoo-community.org
Unsubscribe: https://odoo-community.org/groups?unsubscribe

_______________________________________________
Mailing-List: https://odoo-community.org/groups/contributors-15
Post to: mailto:contributors@odoo-community.org
Unsubscribe: https://odoo-community.org/groups?unsubscribe



--
Moisés López Calderón
Mobile: (+521) 477-752-22-30
Twitter: @moylop260
hangout: moylop260@vauxoo.com
http://www.vauxoo.com - Odoo Gold Partner
Twitter: @vauxoo

Reference