This script outputs openerp objects field values.
It was originally designed to do performance tests before releasing Open ERP version 6.
There are 2 required parameters:
+db <DATABASE_NAME>:
specify the database used by Open ERP+cmd <COMMAND> [PARAMETER]:
specify the command you want to use (and eventually some command parameters)
There are actually 3 commands:
list:
lists open ERP object models like (product.product, sale.order, ...)
print <MODEL>:
outputs all field values for all records for the specified model
all:
outputs csv like lines for all models:: - column 1: model name - column 2: number of records - column 3: number of sql queries generated for that model Warning: for this to work, the Open ERP server needs to output its log to a logfile and this script needs to be able to read the logfile (so the Open ERP server and this script need to be on the same system)
Listing all models:
./perf_test.py +db mydb +cmd "list"
Same usage but we specify db parameters:
./perf_test.py --host 127.0.0.1 -p 8069 --user 'admin' --password 'admin' +db mydb +cmd "list"
Printing object values for product.product model:
./perf_test.py +db mydb +cmd "print product.product"
Generating a csv file with the number of sql queries generated by the Open ERP server:
./perf_test.py +db trunk_perf_01 +cmd "all" \ --server-log /tmp/server.log > perf.csv
Note
Open ERP server was launched with --logfile /tmp/server.log --log-level debug_sql