Exemplo n.º 1
0
 def test_get_base_incorrect_constraint_list(self):
     conf = t1c.Ta1Config()
     conf.performername = "PERF"
     conf.baselinename = "MIT"
     expected_base_incorrect_constraint_list = [
         (t1s.DBP_TABLENAME, t1s.DBP_PERFORMERNAME, conf.baselinename),
         (t1s.DBP_TABLENAME, t1s.DBP_ISTHROUGHPUTQUERY, False),
         (t1s.DBP_TABLENAME, t1s.DBP_ISMODIFICATIONQUERY, False)
     ]
     actual_base_incorrect_constraint_list = conf.get_constraint_list(
         require_correct=False, usebaseline=True)
     self.assertEquals(expected_base_incorrect_constraint_list,
                       actual_base_incorrect_constraint_list)
Exemplo n.º 2
0
 def test_get_tag(self):
     this_config = ta1_config.Ta1Config()
     this_config.performername = "white knight"
     this_config.results_db_path = ":memory:"
     this_report_generator = t1rg.Ta1ReportGenerator(jinja_env=None,
                                                     config=this_config)
     this_section = ta1_section.Ta1Section(
         jinja_template=None, report_generator=this_report_generator)
     this_db_num_records = 101
     this_query_subcat = "eq-and"
     this_selection_cols = "*"
     this_inp = t1ai.Input()
     this_inp[t1s.DBF_NUMRECORDS] = this_db_num_records
     this_inp[t1s.DBF_SUBCAT] = this_query_subcat
     this_inp[t1s.DBP_SELECTIONCOLS] = this_selection_cols
     self.assertEqual(this_section.get_tag(inp=this_inp),
                      "Ta1Section_whiteknight_101_eq-and_*")
Exemplo n.º 3
0
 def test_results_db(self):
     conf = t1c.Ta1Config()
     conf.results_db_path = ":memory:"
     self.assertEquals(type(conf.results_db), t1d.Ta1ResultsDB)
Exemplo n.º 4
0
#  04 Nov 2013   SY             Original version
# *****************************************************************

# general imports:
import sys
import os
import logging

# SPAR imports:
import spar_python.report_generation.ta1.ta1_database as t1d
import spar_python.report_generation.ta1.ta1_schema as t1s
import spar_python.report_generation.ta1.ta1_test_database as t1td
import spar_python.report_generation.common.regression as regression
import spar_python.report_generation.ta1.ta1_config as config

config = config.Ta1Config()

################# CONFIGURE THESE PARAMETERS ONLY FOR EACH TEST ################
config.results_db_path = os.path.expanduser(
    "~/spar-testing/results/results_databases/1krows_100kBpr_v2.db"
)  # the path to the results database
config.img_dir = "./a_mdb_ta1_figures"  # the path to the directory where created figures
# are to be stored.
# be sure to create new image directory
# if you do not want to override previous images.
config.performername = "MDB"  # the name of the performer
config.performerprototype = "MDB TA1 Prototype"  # the name of the performer
# prototype
config.baselinename = "MDB"  # the name of the baseline

# function to be regressed for computing query latency based on number of