diff options
| author | Nicolas Lempereur <nle@odoo.com> | 2019-07-22 13:11:30 +0000 |
|---|---|---|
| committer | Nicolas Lempereur <nle@odoo.com> | 2019-07-22 13:15:23 +0000 |
| commit | 041ec73b2c7559d22d00518aaa1aac25f61dbe7d (patch) | |
| tree | 7dd43fa845e5dfca770552de7460e39f235726ee /doc | |
| parent | fb9caab7c1352c8181c08343e1374b96aa29d1e4 (diff) | |
[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: Nicolas Lempereur (nle) <nle@odoo.com>
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/howtos/profilecode.rst | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/doc/howtos/profilecode.rst b/doc/howtos/profilecode.rst index ed6d2640648..d21c1f3891c 100644 --- a/doc/howtos/profilecode.rst +++ b/doc/howtos/profilecode.rst @@ -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(...): |
