Skip to content
Snippets Groups Projects
Commit 041ec73b authored by Nicolas Lempereur's avatar Nicolas Lempereur
Browse files

[FIX] doc: complete tale about two profilers


This section of log mentionned two profilers making think they were the
same.

The odoo/tools/misc.py `profile` logs a method calls inside a file that
can be used to generate a graph of method calls.

The odoo/tools/profiler.py `profile` logs a method lines calls, queries
and time spend inside the log.

fixes #31278
opw-2038941
closes #35074

Signed-off-by: default avatarNicolas Lempereur (nle) <nle@odoo.com>
parent fb9caab7
Branches
Tags
No related merge requests found
......@@ -17,7 +17,7 @@ its sub-called methods.
.. code:: python
from odoo.tools.profiler import profile
from odoo.tools.misc import profile
[...]
@profile('/temp/prof.profile')
@api.multi
......@@ -37,10 +37,15 @@ A tool called *xdot* will display the resulting graph:
xdot /temp/prof.xdot
The profiler can be also used without saving data in a file:
Log a method
============
Another profiler can be used to log statistics on a method:
.. code:: python
from odoo.tools.profiler import profile
[...]
@profile
@api.model
def mymethod(...):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment