def get_dict_from_compiled_files(files_to_plot): 
	"""
		Returns a dictionary of compiled_file -> All Result records
		from the list of the given files
	"""
	if not files_to_plot:
		raise ValueError('files cannot be None')
	
	dict = {}
        record_marker = '===='
        for file in files_to_plot:
                file_string = read_file_to_string(file)
                records = file_string.split(record_marker)
                results = []

                for record in records:
                        if not record.strip(): # skip empty records
                                continue
                        r = parse_record(record)
                        results.append(r)
                key = file[:-4] # skip the extension
                dict[key] = results
	return dict
Exemple #2
0
def main():

    parser = argparse.ArgumentParser(description="Plots compiled benchmark results")
    parser.add_argument("-f", "--file", help="Compiled Result file to generate graphs from", required=True)
    args = vars(parser.parse_args())

    file = args["file"]

    file_string = read_file_to_string(file)
    record_marker = "===="
    records = file_string.split(record_marker)
    results = []

    for record in records:
        if not record.strip():  # skip empty records
            continue

        r = parse_record(record)
        results.append(r)

    print "we have this many results: %d" % len(results)
    plot_benchmark_result(results)
    print "Plot Completed"