Files
mariadb-connector-python/testing/benchmarks/benchmark/do_1.py
rusher 4c75199a75 [misc] MariaDB benchmark common test suite implementation
benchmark precision improved running on one thread only with at least 1000 warmup operations
2022-09-06 11:03:31 +02:00

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