Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Here we focus on what to do without explaining how to do it.
While we are building and publishing a docker image the current state is that the image
is build at deploy time on OCA server.

While technicaly speaking there is nothing more than accessing to a public commit to
While technically speaking there is nothing more than accessing to a public commit to
deploy a new version it's a common practice to merge your work on branch 14.0 before
deploying a new version in production.

Expand Down Expand Up @@ -61,6 +61,17 @@ download for you if necessary) and install the required dependencies:
uv sync
```

### Neutralize database

If you are allow to access to a production database, neutralization happens while
stating the Docker container if the running environnement is not the production server.

On development, if your are not using docker you can running neutralize scripts such as:

```bash
find entrypoints/neutralize/*.sql -type f -exec psql <dbname> -f {} \;
```

### Development

For addons living in this repository, you can just change code and restart Odoo with the
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# Base stage, with the non-python runtime dependencies, and uv.
#

ARG DISTRO=focal
ARG DISTRO=jammy
FROM ghcr.io/acsone/odoo-bedrock:14.0-py39-${DISTRO}-latest AS base

# Install apt runtime dependencies.
Expand Down
46 changes: 46 additions & 0 deletions benchmarks/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Benchmarks

Here a series of [locust]() script to bench mark Odoo loads in different scenarios.

## launch test

- start an odoo you want to test (not the test/production server it's the same machine,
please!) (ie: `uv run odoo -d oca-20250828 --workers=4`)
- launch locust in a dedicated python ephemeral env (such as
`uvx locust -f <locust_bench_file.py>`)
- go to the locust web interface and configure as desired
- launch the test !

## Analysis

### app store search

Running Odoo on my laptop with 4 workers.

Assets:

I've extract slow HTTP request (CPU time > 1s) from odoo werkzurg logger (not present in
this repo)

- uri_shop\*.txt: are the 1000 slowest/quickest
- product_autocomplete.txt are 1000 slowest/quickest offset 2000 queries from
`/shop[/category]` `search` parameters

#### Run 1: without change

- [Results 0 to 100 users adding 1 user every second](results/app_sotre_search/01_no_change_1_to_100.html)

#### Run 2: refactor website_app_store

In website_apps_store module, source code where calling super() and was over-writing
most of the results making a lot of useless SQL requests:
[PR OCA/apps-store#96](https://github.com/OCA/apps-store/pull/96)

- [Results 0 to 100 users adding 1 user every second](results/app_sotre_search/02_refactor_1_to_100.html)

#### Run 3: early return NotFound() in case user search non ascii chars

The analysis prove that we are getting a lot of ugly requests that we want to ignore.
waiting a proper defender solution to ban those users

- [Results 0 to 100 users adding 1 user every second](results/app_sotre_search/03_ignore_non_ascii_search_1_to_100.html)
Loading