Files
mariadb-connector-python/testing/benchmarks/benchmark/do_1.py
Georg Richter 29b05e3b09 Various fixes and changes for SQLAlchemy support:
- added a thin python wrapper around mariadb module
- added constansts under mariadb.constants (CLIENT, CURSOR, INDICATOR)
- bench and test are now in testing subdirectory
- updated documentation
2020-07-24 12:13:31 +02:00

16 lines
287 B
Python

#!/usr/bin/env python3 -O
# -*- coding: utf-8 -*-
import pyperf
def do1(loops, conn):
cursor = conn.cursor()
range_it = range(loops)
t0 = pyperf.perf_counter()
for value in range_it:
cursor.execute('do 1')
del cursor
return pyperf.perf_counter() - t0