diff options
author | Craig Tiller <ctiller@google.com> | 2017-03-29 08:17:11 -0700 |
---|---|---|
committer | Craig Tiller <ctiller@google.com> | 2017-03-29 08:17:11 -0700 |
commit | ebb7e82c73884511188d3f43f5e9df1d6058aa66 (patch) | |
tree | 6897925c1f00550b1dd40ba590ff14d91b661610 /tools | |
parent | 42a3eed534d708c16d6f0c36278055362fdaec96 (diff) |
Use python for commenting
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/profiling/microbenchmarks/bm_diff.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/profiling/microbenchmarks/bm_diff.py b/tools/profiling/microbenchmarks/bm_diff.py index b74a857ade..43ba1b47e0 100755 --- a/tools/profiling/microbenchmarks/bm_diff.py +++ b/tools/profiling/microbenchmarks/bm_diff.py @@ -38,6 +38,9 @@ import subprocess import multiprocessing import collections import pipes +import os +sys.path.append(os.path.join(os.path.dirname(sys.argv[0]), '..', '..', 'run_tests', 'python_utils')) +import comment_on_pr def changed_ratio(n, o): if float(o) <= .0001: o = 0 @@ -82,7 +85,6 @@ argp.add_argument('-b', '--benchmarks', nargs='+', choices=_AVAILABLE_BENCHMARK_ argp.add_argument('-d', '--diff_base', type=str) argp.add_argument('-r', '--repetitions', type=int, default=5) argp.add_argument('-p', '--p_threshold', type=float, default=0.05) -argp.add_argument('-g', '--git_comment', action='store_const', const=True, default=False) args = argp.parse_args() assert args.diff_base @@ -206,8 +208,6 @@ if rows: text = 'Performance differences noted:\n' + tabulate.tabulate(rows, headers=headers, floatfmt='+.2f') else: text = 'No significant performance differences' +comment_on_pr.comment_on_pr(text) print text -if args.git_comment: - subprocess.call(['tools/jenkins/comment_on_pr.sh', text], - stdout=subprocess.PIPE) |