-
Notifications
You must be signed in to change notification settings - Fork 18
add --path option #20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Thanks. What is |
benchmark
Outdated
@@ -299,6 +297,10 @@ def main(): | |||
default=1, | |||
help='Number of runs for each compilation') | |||
|
|||
parser.add_argument('--path', dest='path', nargs='+', | |||
default=["/usr/local/bin"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggested "/usr/local/bin"
here, but I'm open for other default option!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could actually be defaulted to $PATH?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes actually more sense to me so commited a patch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is the current behavior kept if the --path
is not given?
Changed default again as per your last comment suggested. benchmark --path=/usr/local/bin:/usr/bin |
example of a use case: compiling clang in 2 stages or not, both with LTO optimization:
|
Sorry for not seeing this until now but can you please move the iteration over the paths out from each benchmark_... function into into Someting like for exe_path in args.exe_paths:
if 'Go' in args.languages:
if 'Check' in args.operations:
benchmark_Go(results=results, code_paths=code_paths, args=args, op='Check', templated=False, exe_path=exe_path)
if 'Build' in args.operations:
benchmark_Go(results=results, code_paths=code_paths, args=args, op='Build', templated=False, exe_path=exe_path)
# and similarly for other languages ? While you're at it can you refactor if 'Check' in args.operations:
benchmark_Swift(results=results, code_paths=code_paths, args=args, op='Check', templated=False)
if 'Build' in args.operations:
benchmark_Swift(results=results, code_paths=code_paths, args=args, op='Build', templated=False) to for op in args.operations:
benchmark_Swift(results=results, code_paths=code_paths, args=args, op=op, templated=False) and have each |
good point, I'll have a look! |
Thanks!
Sound good to me! |
9b6431f
to
f3b09e1
Compare
Adds a
--path
optional command line argument to specify a path in which to look for compilers.Possible usage:
This allows for the testing of several different builds of the same version of compiler, for instance, clang-13 with or without LTO.