Make perf.py changes work as part of alloy.py

This commit is contained in:
Dmitry Babokin
2013-11-13 15:07:21 +04:00
parent 65ea6fd48a
commit 8f768633ad
2 changed files with 6 additions and 4 deletions

View File

@@ -495,6 +495,7 @@ def validation_run(only, only_targets, reference_branch, number, notify, update,
performance.ref = "ispc_ref"
if current_OS == "Windows":
performance.ref = "ispc_ref.exe"
performance.perf_target = ""
performance.in_file = "." + os.sep + f_date + os.sep + "performance.log"
# prepare LLVM 3.3 as newest LLVM
need_LLVM = check_LLVM(["3.3"])

View File

@@ -392,7 +392,8 @@ def perf(options1, args):
print_debug("Okey go go go!\n\n", s, perf_log)
# report command line
print_debug("Command line: %s\n" % " ".join(map(str, sys.argv)), s, perf_log)
if __name__ == "__main__":
print_debug("Command line: %s\n" % " ".join(map(str, sys.argv)), s, perf_log)
# report used ispc
print_debug("Testing ispc: " + ispc_test + "\n", s, perf_log)
@@ -424,8 +425,8 @@ def perf(options1, args):
command = command[:-1]
# handle conditional target argument
target_str = ""
if options.target != "":
target_str = " ISPC_IA_TARGETS="+options.target
if options.perf_target != "":
target_str = " ISPC_IA_TARGETS="+options.perf_target
if is_windows == False:
ex_command_ref = "./ref " + command + " >> " + perf_temp + "_ref"
ex_command = "./test " + command + " >> " + perf_temp + "_test"
@@ -510,7 +511,7 @@ if __name__ == "__main__":
help='set reference compiler for compare', default="")
parser.add_option('-f', '--file', dest='in_file',
help='file to save perf output', default="")
parser.add_option('-t', '--target', dest='target',
parser.add_option('-t', '--target', dest='perf_target',
help='set ispc target for building benchmarks (both test and ref)', default="")
(options, args) = parser.parse_args()
perf(options, args)