OmniSciDB  a5dc49c757
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
run_benchmark_import.py File Reference

Go to the source code of this file.

Namespaces

 run_benchmark_import
 

Functions

def run_benchmark_import.get_connection
 
def run_benchmark_import.json_format_handler
 

Variables

tuple run_benchmark_import.parser = ArgumentParser()
 
tuple run_benchmark_import.optional = parser._action_groups.pop()
 
tuple run_benchmark_import.required = parser.add_argument_group("required arguments")
 
string run_benchmark_import.action = "store_true"
 
string run_benchmark_import.help = "Suppress script outuput "
 
string run_benchmark_import.dest = "passwd"
 
string run_benchmark_import.default = "HyperInteractive"
 
 run_benchmark_import.type = int,
 
tuple run_benchmark_import.args = parser.parse_args()
 
 run_benchmark_import.source_db_user = args.user
 
 run_benchmark_import.source_db_passwd = args.passwd
 
 run_benchmark_import.source_db_server = args.server
 
 run_benchmark_import.source_db_port = args.port
 
 run_benchmark_import.source_db_name = args.name
 
 run_benchmark_import.label = args.label
 
 run_benchmark_import.import_file = args.import_file
 
 run_benchmark_import.table_schema_file = args.table_schema_file
 
 run_benchmark_import.import_table_name = args.import_table_name
 
 run_benchmark_import.import_query_template_file = args.import_query_template_file
 
 run_benchmark_import.no_drop_table_before = args.no_drop_table_before
 
 run_benchmark_import.no_drop_table_after = args.no_drop_table_after
 
 run_benchmark_import.import_test_name = args.import_test_name
 
 run_benchmark_import.machine_name = args.machine_name
 
 run_benchmark_import.machine_uname = args.machine_uname
 
tuple run_benchmark_import.destinations = args.destination.split(",")
 
 run_benchmark_import.valid_destination_set = True
 
 run_benchmark_import.dest_db_user = args.dest_user
 
 run_benchmark_import.dest_db_passwd = args.dest_passwd
 
 run_benchmark_import.dest_db_server = args.dest_server
 
 run_benchmark_import.dest_db_port = args.dest_port
 
 run_benchmark_import.dest_db_name = args.dest_name
 
 run_benchmark_import.dest_table = args.dest_table
 
 run_benchmark_import.dest_table_schema_file = args.dest_table_schema_file
 
 run_benchmark_import.output_file_json = args.output_file_json
 
 run_benchmark_import.output_file_jenkins = args.output_file_jenkins
 
tuple run_benchmark_import.con
 
tuple run_benchmark_import.run_guid = str(uuid.uuid4())
 
tuple run_benchmark_import.run_timestamp = datetime.datetime.now()
 
tuple run_benchmark_import.run_connection = str(con)
 
string run_benchmark_import.run_driver = ""
 
tuple run_benchmark_import.run_version = con._client.get_version()
 
tuple run_benchmark_import.run_version_short = run_version.split("-")
 
tuple run_benchmark_import.conn_machine_name = re.search(r"@(.*?):", run_connection)
 
tuple run_benchmark_import.local_uname = os.uname()
 
 run_benchmark_import.run_machine_name = machine_name
 
 run_benchmark_import.run_machine_uname = machine_uname
 
tuple run_benchmark_import.create_table_sql = table_schema.read()
 
tuple run_benchmark_import.res = con.execute(create_table_sql)
 
tuple run_benchmark_import.import_query = import_query_template.read()
 
tuple run_benchmark_import.start_time = timeit.default_timer()
 
tuple run_benchmark_import.end_time = timeit.default_timer()
 
tuple run_benchmark_import.query_elapsed_time = round(((end_time - start_time) * 1000), 1)
 
 run_benchmark_import.execution_time = res._result.execution_time_ms
 
tuple run_benchmark_import.connect_time = round((query_elapsed_time - execution_time), 2)
 
tuple run_benchmark_import.res_output = str(res.fetchall()[0])
 
tuple run_benchmark_import.rows_loaded = re.search(r"Loaded: (.*?) recs, R", res_output)
 
tuple run_benchmark_import.rows_rejected = re.search(r"Rejected: (.*?) recs i", res_output)
 
dictionary run_benchmark_import.result
 
tuple run_benchmark_import.result_json = json.dumps(result, default=json_format_handler, indent=2)
 
tuple run_benchmark_import.results_df = pandas.DataFrame(result, index=[0])
 
tuple run_benchmark_import.dest_con
 
tuple run_benchmark_import.tables = dest_con.get_tables()
 
tuple run_benchmark_import.file_json_open = open(output_file_json, "w")
 
tuple run_benchmark_import.jenkins_bench_json
 
tuple run_benchmark_import.file_jenkins_open = open(output_file_jenkins, "w")