Fixed fetch benchmarks

This commit is contained in:
Georg Richter
2020-01-13 05:35:50 +00:00
parent c2adf0b528
commit 99766699cf
4 changed files with 7 additions and 12 deletions

View File

@ -5,10 +5,10 @@
import importlib
from test.conf_test import conf, dbmodule
from test.conf_test import conf, glob
from benchmarks.setup_db import init_db, end_db
module= dbmodule();
module= glob();
dbdrv = importlib.import_module(module["module"])
def main():

View File

@ -7,9 +7,8 @@ def str_fetchall(loops, conn):
cursor = conn.cursor()
range_it = range(loops)
t0 = pyperf.perf_counter()
a= (1,)
for value in range_it:
cursor.execute('select col1,col2,col3 from str_test WHERE 1=?', a)
cursor.execute('select col1,col2,col3 from str_test')
row= cursor.fetchall()
del row
del cursor
@ -19,9 +18,8 @@ def str_fetchloop(loops, conn):
cursor = conn.cursor()
range_it = range(loops)
t0 = pyperf.perf_counter()
a= (1,)
for value in range_it:
cursor.execute('select col1,col2,col3 from str_test WHERE 1=?', a)
cursor.execute('select col1,col2,col3 from str_test')
row= cursor.fetchone()
while row is not None:
row= cursor.fetchone()
@ -32,9 +30,8 @@ def num_fetchall(loops, conn):
cursor = conn.cursor()
range_it = range(loops)
t0 = pyperf.perf_counter()
a= (1,)
for value in range_it:
cursor.execute('select col1,col2,col3,col4,col5 from num_test WHERE 1=?', a)
cursor.execute('select col1,col2,col3,col4,col5 from num_test')
row= cursor.fetchall()
del row
del cursor
@ -44,9 +41,8 @@ def num_fetchloop(loops, conn):
cursor = conn.cursor()
range_it = range(loops)
t0 = pyperf.perf_counter()
a= (1,)
for value in range_it:
cursor.execute('select col1,col2,col3,col4,col5 from num_test WHERE 1=?', a)
cursor.execute('select col1,col2,col3,col4,col5 from num_test')
row= cursor.fetchone()
while row is not None:
row= cursor.fetchone()

View File

@ -6,7 +6,6 @@ import pyperf, os
from benchmarks.benchmark.do_1 import do1
from benchmarks.benchmark.fetch import *
from benchmarks.benchmark.select_str import test_str
from benchmarks.benchmark.select_1 import select_1
from benchmarks.benchmark.select_param import select_param
from benchmarks.benchmark.select_10_cols_from_seq_1_to_10000 import \

View File

@ -5,4 +5,4 @@ link_static=on
# Windows: location of MySQL Connector/C installation
install_dir=c:\Program Files\MariaDB\MariaDB Connector C 64-bit
# Posix: location of mariadb_config executable
mariadb_config=/usr/local/bin/mariadb_config
mariadb_config=/home/georg/cc/bin/mariadb_config