mirror of
https://github.com/mariadb-corporation/mariadb-connector-python.git
synced 2025-08-02 13:56:54 +00:00

benchmark precision improved running on one thread only with at least 1000 warmup operations
16 lines
307 B
Python
16 lines
307 B
Python
#!/usr/bin/env python3 -O
|
|
# -*- coding: utf-8 -*-
|
|
|
|
import pyperf
|
|
|
|
|
|
def do1(loops, conn, paramstyle):
|
|
range_it = range(loops)
|
|
|
|
t0 = pyperf.perf_counter()
|
|
for value in range_it:
|
|
cursor = conn.cursor()
|
|
cursor.execute('do 1')
|
|
del cursor
|
|
return pyperf.perf_counter() - t0
|