Files
mariadb-connector-python/benchmarks
rusher a169c3949d [misc] various change
- correct tests according to server/maxscale, and multiple python version
  - Cpython (3.6.0, 3.8.0) pypy (3.6-7.2.0), miniconda3-4.3.30
- add scroll test
- benchmark added to test suite. See benchmarks/README.md for info
- cursor.scroll now permit position 0 when using absolute mode
- return Cursor.rownumber None if no result-set, not 0
- exception missing type sqlstate and according tests
2019-11-29 12:13:05 +01:00
..
2019-11-29 12:13:05 +01:00
2019-11-29 12:13:05 +01:00
2019-11-29 12:13:05 +01:00

Benchmark

pip install mysql-connector-python pyperf
python bench_mariadb.py -o mariadb_bench.json --inherit-environ=TEST_USER,TEST_HOST,TEST_PORT
python bench_mysql.py -o mysql_bench.json --inherit-environ=TEST_USER,TEST_HOST,TEST_PORT

Results are available to pyperf json format

An example of

>python -m pyperf compare_to mysql_bench.json mariadb_bench.json --table
+----------------------------------------------------+-------------+------------------------------+
| Benchmark                                          | mysql_bench | mariadb_bench                |
+====================================================+=============+==============================+
| do 1                                               | 114 us      | 45.4 us: 2.50x faster (-60%) |
+----------------------------------------------------+-------------+------------------------------+
| select 1                                           | 209 us      | 57.3 us: 3.65x faster (-73%) |
+----------------------------------------------------+-------------+------------------------------+
| select 1 mysql user                                | 1.04 ms     | 122 us: 8.52x faster (-88%)  |
+----------------------------------------------------+-------------+------------------------------+
| Select <10 cols of 100 chars> from_seq_1_to_100000 | 323 ms      | 35.0 ms: 9.22x faster (-89%) |
+----------------------------------------------------+-------------+------------------------------+```