OmniSciDB
a5dc49c757
|
Functions | |
def | execute_query |
def | calculate_query_times |
def | run_query |
def | create_results_dataset |
def | process_arguments |
def | benchmark |
def run_benchmark_arrow.benchmark | ( | input_arguments | ) |
Definition at line 814 of file run_benchmark_arrow.py.
References create_results_dataset(), run_benchmark.get_connection(), run_benchmark.get_gpu_info(), run_benchmark.get_machine_info(), run_benchmark.get_run_vars(), process_arguments(), run_benchmark.read_query_files(), run_query(), run_benchmark.send_results_db(), run_benchmark.send_results_file_json(), run_benchmark.send_results_jenkins_bench(), run_benchmark.send_results_output(), and run_benchmark.verify_destinations().
def run_benchmark_arrow.calculate_query_times | ( | kwargs | ) |
Calculates aggregate query times from all iteration times Kwargs: total_times(list): List of total time calculations execution_times(list): List of execution_time calculations connect_times(list): List of connect_time calculations arrow_conversion_times(list): List of arrow_conversion_time calculations trim(float): Amount to trim from iterations set to gather trimmed values. Enter as deciman corresponding to percent to trim - ex: 0.15 to trim 15%. Returns: query_execution(dict): Query times False(bool): The query failed. Exception should be logged.
Definition at line 128 of file run_benchmark_arrow.py.
Referenced by create_results_dataset().
def run_benchmark_arrow.create_results_dataset | ( | kwargs | ) |
Create results dataset Kwargs: run_guid(str): Run GUID run_timestamp(datetime): Run timestamp run_connection(str): Connection string run_machine_name(str): Run machine name run_machine_uname(str): Run machine uname run_driver(str): Run driver run_version(str): Version of DB run_version_short(str): Shortened version of DB label(str): Run label source_db_gpu_count(int): Number of GPUs on run machine source_db_gpu_driver_ver(str): GPU driver version source_db_gpu_name(str): GPU name source_db_gpu_mem(str): Amount of GPU mem on run machine source_table(str): Table to run query against trim(float): Trim decimal to remove from top and bottom of results iterations(int): Number of iterations of each query to run query_group(str): Query group, usually matches table name query_results(dict)::: query_name(str): Name of query query_mapdql(str): Query to run query_id(str): Query ID query_succeeded(bool): Query succeeded query_error_info(str): Query error info result_count(int): Number of results returned initial_iteration_results(dict)::: first_execution_time(float): Execution time for first query iteration first_connect_time(float): Connect time for first query iteration first_total_time(float): Total time for first iteration first_cpu_mem_usage(float): CPU memory usage for first query iteration first_gpu_mem_usage(float): GPU memory usage for first query iteration noninitial_iteration_results(list)::: execution_time(float): Time (in ms) that pymapd reports backend spent on query. connect_time(float): Time (in ms) for overhead of query, calculated by subtracting backend execution time from time spent on the execution function. arrow_conversion_time(float): Time (in ms) it took for arrow conversion and serialization fo results. total_time(float): Time (in ms) from adding all above times. query_total_elapsed_time(int): Total elapsed time for query Returns: results_dataset(list)::: result_dataset(dict): Query results dataset
Definition at line 391 of file run_benchmark_arrow.py.
References calculate_query_times().
Referenced by benchmark().
def run_benchmark_arrow.execute_query | ( | kwargs | ) |
Executes a query against the connected db using pymapd https://pymapd.readthedocs.io/en/latest/usage.html#querying Kwargs: query_name(str): Name of query query_mapdql(str): Query to run iteration(int): Iteration number con(class): Connection class Returns: query_execution(dict)::: result_count(int): Number of results returned execution_time(float): Time (in ms) that pymapd reports backend spent on query. connect_time(float): Time (in ms) for overhead of query, calculated by subtracting backend execution time from time spent on the execution function. arrow_conversion_time(float): Time (in ms) for converting and serializing results in arrow format total_time(float): Time (in ms) from adding all above times. False(bool): The query failed. Exception should be logged.
Definition at line 30 of file run_benchmark_arrow.py.
Referenced by run_query().
def run_benchmark_arrow.process_arguments | ( | input_arguments | ) |
def run_benchmark_arrow.run_query | ( | kwargs | ) |
Takes query name, syntax, and iteration count and calls the execute_query function for each iteration. Reports total, iteration, and exec timings, memory usage, and failure status. Kwargs: query(dict)::: name(str): Name of query mapdql(str): Query syntax to run iterations(int): Number of iterations of each query to run trim(float): Trim decimal to remove from top and bottom of results con(class 'pymapd.connection.Connection'): Mapd connection Returns: query_results(dict)::: query_name(str): Name of query query_mapdql(str): Query to run query_id(str): Query ID query_succeeded(bool): Query succeeded query_error_info(str): Query error info result_count(int): Number of results returned initial_iteration_results(dict)::: first_execution_time(float): Execution time for first query iteration first_connect_time(float): Connect time for first query iteration first_results_iter_time(float): Results iteration time for first query iteration first_total_time(float): Total time for first iteration first_cpu_mem_usage(float): CPU memory usage for first query iteration first_gpu_mem_usage(float): GPU memory usage for first query iteration noninitial_iteration_results(list)::: execution_time(float): Time (in ms) that pymapd reports backend spent on query. connect_time(float): Time (in ms) for overhead of query, calculated by subtracting backend execution time from time spent on the execution function. results_iter_time(float): Time (in ms) it took to for pymapd.fetchone() to iterate through all of the results. total_time(float): Time (in ms) from adding all above times. query_total_elapsed_time(int): Total elapsed time for query False(bool): The query failed. Exception should be logged.
Definition at line 211 of file run_benchmark_arrow.py.
References File_Namespace.append(), execute_query(), and run_benchmark.get_mem_usage().
Referenced by benchmark().