This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from locust import HttpUser, task, between, events | |
import odoorpc | |
import logging | |
import time | |
import sys | |
``` | |
With this locust file, you can benchmark rpc calls of Odoo, eg load_views, fields_view_get, search etc. | |
NOTE: There is another Gist for testing page loads (test-pageload.py) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from locust import HttpUser, task, between, events | |
import logging | |
import time | |
import sys | |
``` | |
With this locust file, you can benchmark page loads of Odoo, eg /web, /my/orders, etc. | |
NOTE: There is another Gist for testing RPC calls (test-rpc.py) | |
HOW TO USE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
################################################################################## | |
## ## | |
## To run this script by command line in background issue this command ## | |
## ./monitoring-odoo-postgresql-lock > /dev/null 2>&1 & ## | |
## To kill this script if running issue this command ## | |
## pkill -f monitoring-odoo-postgresql-lock ## | |
## To add this script to crontab: ## | |
## @reboot /path/to/monitoring-odoo-postgresql-lock > /dev/null 2>&1 || true ## | |
## ## |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE OR REPLACE FUNCTION check_quants_equal_moves() | |
RETURNS TRIGGER AS | |
$BODY$ | |
DECLARE | |
quants_amount int; | |
moves_from int; | |
moves_to int; | |
BEGIN | |
quants_amount := ( | |
select sum(quantity) qty |