summaryrefslogtreecommitdiff
path: root/doc/howtos/profilecode.rst
diff options
context:
space:
mode:
Diffstat (limited to 'doc/howtos/profilecode.rst')
-rw-r--r--doc/howtos/profilecode.rst9
1 files changed, 7 insertions, 2 deletions
diff --git a/doc/howtos/profilecode.rst b/doc/howtos/profilecode.rst
index 1251c052ff7..26bd5c967df 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')
def mymethod(...)
@@ -36,10 +36,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(...):