Home | History | Annotate | Download | only in gbench

Lines Matching refs:filename

15 def is_executable_file(filename):
17 Return 'True' if 'filename' names a valid file which is likely
21 if not os.path.isfile(filename):
23 with open(filename, mode='rb') as f:
40 def is_json_file(filename):
42 Returns 'True' if 'filename' names a valid JSON output file.
46 with open(filename, 'r') as f:
54 def classify_input_file(filename):
57 of 'filename'. If 'type' is 'IT_Invalid' then 'msg' is a human readable
62 if not os.path.exists(filename):
63 err_msg = "'%s' does not exist" % filename
64 elif not os.path.isfile(filename):
65 err_msg = "'%s' does not name a file" % filename
66 elif is_executable_file(filename):
68 elif is_json_file(filename):
71 err_msg = "'%s' does not name a valid benchmark executable or JSON file" % filename
75 def check_input_file(filename):
77 Classify the file named by 'filename' and return the classification.
81 ftype, msg = classify_input_file(filename)
146 def run_or_load_benchmark(filename, benchmark_flags):
148 Get the results for a specified benchmark. If 'filename' specifies
150 benchmark. Otherwise 'filename' must name a valid JSON output file,
153 ftype = check_input_file(filename)
155 return load_benchmark_results(filename)
157 return run_benchmark(filename, benchmark_flags)