Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
Coopdevs OCB mirror
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Coopdevs
Odoo
Coopdevs OCB mirror
Commits
772b854f
Commit
772b854f
authored
6 years ago
by
Yenthe V.G
Committed by
Martin Trigaux
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
[IMP] doc: improve wording in profile code docs
closes odoo/odoo#29424
parent
6bb4b669
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
doc/howtos/profilecode.rst
+8
-8
8 additions, 8 deletions
doc/howtos/profilecode.rst
with
8 additions
and
8 deletions
doc/howtos/profilecode.rst
+
8
−
8
View file @
772b854f
...
...
@@ -12,8 +12,8 @@ Graph a method
Odoo embeds a profiler of code. This embeded profiler output can be used to
generate a graph of calls triggered by the method, number of queries, percentage
of time taken in the method itself as well as time t
aken in
method
and it's
sub-called methods.
of time taken in the method itself as well as
the
time t
hat the
method
took and
its
sub-called methods.
.. code:: python
...
...
@@ -23,7 +23,7 @@ sub-called methods.
@api.multi
def mymethod(...)
This produce a file called /temp/prof.profile
This produce
s
a file called /temp/prof.profile
A tool called *gprof2dot* will produce a graph with this result:
...
...
@@ -37,7 +37,7 @@ 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
.
The profiler can be also used without saving data in a file
:
.. code:: python
...
...
@@ -78,7 +78,7 @@ completely reviewed.
Dump stack
==========
Sending the SIGQUIT signal to an
o
doo process (only available on POSIX) makes
Sending the SIGQUIT signal to an
O
doo process (only available on POSIX) makes
this process output the current stack trace to log, with info level. When an
odoo process seems stucked, sending this signal to the process permit to know
what the process is doing, and letting the process continue his job.
...
...
@@ -86,8 +86,8 @@ what the process is doing, and letting the process continue his job.
Tracing code execution
======================
Instead of sending the SIGQUIT signal to an
o
doo process often enough, to check
where processes
is
performing worse than expected, we can use pyflame tool to
Instead of sending the SIGQUIT signal to an
O
doo process often enough, to check
where
the
processes
are
performing worse than expected, we can use
the
pyflame tool to
do it for us.
Install pyflame and flamegraph
...
...
@@ -118,7 +118,7 @@ Once done, we'll display them as an execution graph.
where <PID> is the process ID of the odoo process you want to graph. This will
wait until the dead of the process, with a maximum of one hour, and and get 5
traces a second. With the output of pyflame, we can produce an
svg
graph with
traces a second. With the output of pyflame, we can produce an
SVG
graph with
the flamegraph tool:
.. code:: bash
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment