def output(results_dir, config, parent='../../'):
    """Write the results output for the given test

    :param str results_dir: the directory for the results
    :param dict config: the configuration of the test
    :param str parents: the parent directory
    """
    start = time.time()
    print("Compiling results...")
    results_dir = os.path.abspath(results_dir)
    results = ReportResults(config['run_time'], config['results_ts_interval'])
    results.compile_results()
    print("Results compiled in {} seconds\n".format(time.time() - start))

    if results.total_transactions == 0:
        print("No results, cannot create report")
        return False

    print_infos(results)

    data = {
        'report': results,
        'run_time': config['run_time'],
        'ts_interval': config['results_ts_interval'],
        'turrets_config': results.turrets,
        'results': {"all": results.main_results, "timers": results.timers_results}
    }

    print("Generating graphs...")
    partial = time.time()
    generate_graphs(results.main_results, 'All_Transactions', results_dir)

    for key, value in results.timers_results.items():
        generate_graphs(value, key, results_dir)
    print("All graphs generated in {} seconds\n".format(time.time() - partial))

    write_template(data, results_dir, parent)
    print("Full report generated in {} seconds".format(time.time() - start))
    return True
def output ( results_dir , config , parent = '../../' ) : start = time . time ( ) print ( "Compiling results..." ) results_dir = os . path . abspath ( results_dir ) results = ReportResults ( config [ 'run_time' ] , config [ 'results_ts_interval' ] ) results . compile_results ( ) print ( "Results compiled in {} seconds\n" . format ( time . time ( ) - start ) ) if results . total_transactions == 0 : print ( "No results, cannot create report" ) return False print_infos ( results ) data = { 'report' : results , 'run_time' : config [ 'run_time' ] , 'ts_interval' : config [ 'results_ts_interval' ] , 'turrets_config' : results . turrets , 'results' : { "all" : results . main_results , "timers" : results . timers_results } } print ( "Generating graphs..." ) partial = time . time ( ) generate_graphs ( results . main_results , 'All_Transactions' , results_dir ) for key , value in results . timers_results . items ( ) : generate_graphs ( value , key , results_dir ) print ( "All graphs generated in {} seconds\n" . format ( time . time ( ) - partial ) ) write_template ( data , results_dir , parent ) print ( "Full report generated in {} seconds" . format ( time . time ( ) - start ) ) return True
Write the results output for the given test

    :param str results_dir: the directory for the results
    :param dict config: the configuration of the test
    :param str parents: the parent directory