Integration of python cprofile and postgresql logging collector for Odoo Check the Profiler menu in admin menu
auto_awesome What this module does
AI-generated from the code · Odoo 14.0Lets administrators record and analyse the performance of Odoo itself, capturing Python code execution and PostgreSQL query statistics for a chosen period and showing the slowest or most frequent operations.
This module adds a Profiler area for system administrators. Under the Profiler menu you create a Profile record, give it a name and choose what to measure.
- Python profiling can cover all activity or be limited to individual HTTP requests; PostgreSQL logging can be enabled at the same time.
- The form has Enable, Disable and Clear buttons and a status bar showing whether the profile is enabled or disabled, plus start and finish dates.
- While a profile runs, the module records the work done: for the "all activity" mode it stores a profiling file and, if you ask for the readable report, a list of Python lines with number of calls, total time, time per call and cumulative time. For the "per HTTP request" mode it lists each request with its path, user, context and duration.
- When PostgreSQL logging is on, the profile shows three ready-made tables: slowest queries, most time-consuming queries and most frequent queries, produced from the database log.
- Attachments (profiling files and database reports) are linked to the profile and can be opened from a button on the form.
Everything is restricted to the Settings administrator group. Profiling all activity requires the server to run without workers, and PostgreSQL logging needs the database server configured to collect logs.
Depends on
Menus it adds
Models and fields (3)
- profiler.profile · new modelname, state, session, pg_remote, description, pg_log_path, date_started, use_py_index, date_finished, enable_python, python_method, py_stats_lines, attachment_count, py_request_lines, enable_postgresql, pg_stats_slowest_html (PostgreSQL Stats - Slowest), pg_stats_most_frequent_html (PostgreSQL Stats - Most Frequent), pg_stats_time_consuming_html (PostgreSQL Stats - Time Consuming)
- profiler.profile.python.line · new modelprofile_id, cprof_fname (Filename:lineno(method)), cprof_ncalls (Calls), cprof_cumtime (Cumulative time), cprof_nrcalls (Recursive Calls), cprof_tottime (Total time), cprof_ctpercall (CT per call), cprof_ttpercall (Time per call)
- profiler.profile.request.line · new modelname (Path), user_id (User), root_url (Root URL), profile_id, total_time (Time in ms), display_name (Name), user_context (Context), attachment_id (pStats file)
Text generated by AI (DeepSeek) from reading the Odoo 14.0 code on GitHub; it may contain mistakes, so check the code before deciding. View the code on GitHub
Availability by version
Reviewed: 2026-11-03Confirmation status: 3 confirmed, 6 with no information of 9 versions.
Sources · Odoo 14.0
Confirmed on 2026-11-03 in branch 14.0 of OCA/server-tools.
terminal Installation and usage
OCA documentation · Odoo 14.0Installation
Source · Odoo 14.0To make use of the Postgres capabilities, enable Postgres logging and install PGbadger.
Python profiling will work out of the box.
Usage
Source · Odoo 14.0For Python profiling we have two methods:
Full profiling: Profile anything that happens between A and B. For this method, start Odoo with workers=0, create a profile record and select Python method 'All activity'. Enable the profiler, do actions in Odoo, and disable again. Under 'Attachments' you can download the cProfile stats file.
Profile current session per HTTP request: Profile HTTP requests in the active user session. This method also works in multi-worker mode. Create a profile record and select Python method 'Per HTTP request'. Enable the profiler, do actions in Odoo, and see the list filling up with requests. After some time, disable. You can find your slow HTTP requests by sorting on the 'Total time' column, and download the cProfile stats file for further analysis.
Stats files can be analyzed visually for example with Snakeviz or Tuna.
No verified information in OCA: Configuration.
Installation instructions, the distribution package, dependencies and configuration steps are not shown because they have not yet been verified in the module documentation for any version.
Data imported from GitHub: this sheet reflects the latest catalog review, not a live lookup. Always check the module documentation and staging before installing in production.