aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2017-06-09 10:55:02 -0700
committerGravatar Craig Tiller <ctiller@google.com>2017-06-09 10:55:02 -0700
commit326c951ef9087e57ca73255a9359e65c34b04f1e (patch)
tree6fa6b4186281910659342f581b94f3b7bcff5d29 /tools
parent91b623a10210156b03004325188b9f63b511c08f (diff)
parenta461f0d46ccf03bc8e107a7038296e237089d179 (diff)
Merge github.com:grpc/grpc into epex5
Diffstat (limited to 'tools')
-rwxr-xr-xtools/profiling/microbenchmarks/bm_diff/bm_diff.py11
-rwxr-xr-xtools/profiling/microbenchmarks/bm_diff/bm_main.py6
-rwxr-xr-xtools/run_tests/sanity/core_banned_functions.py5
3 files changed, 17 insertions, 5 deletions
diff --git a/tools/profiling/microbenchmarks/bm_diff/bm_diff.py b/tools/profiling/microbenchmarks/bm_diff/bm_diff.py
index 881e157ccd..b8e803749a 100755
--- a/tools/profiling/microbenchmarks/bm_diff/bm_diff.py
+++ b/tools/profiling/microbenchmarks/bm_diff/bm_diff.py
@@ -185,9 +185,14 @@ def diff(bms, loops, track, old, new):
for name in sorted(benchmarks.keys()):
if benchmarks[name].skip(): continue
rows.append([name] + benchmarks[name].row(fields))
- note = 'Corrupt JSON data (indicates timeout or crash) = %s' % str(
- badjson_files)
- note += '\n\nMissing files (new benchmark) = %s' % str(nonexistant_files)
+ note = None
+ if len(badjson_files):
+ note = 'Corrupt JSON data (indicates timeout or crash) = %s' % str(badjson_files)
+ if len(nonexistant_files):
+ if note:
+ note += '\n\nMissing files (indicates new benchmark) = %s' % str(nonexistant_files)
+ else:
+ note = '\n\nMissing files (indicates new benchmark) = %s' % str(nonexistant_files)
if rows:
return tabulate.tabulate(rows, headers=headers, floatfmt='+.2f'), note
else:
diff --git a/tools/profiling/microbenchmarks/bm_diff/bm_main.py b/tools/profiling/microbenchmarks/bm_diff/bm_main.py
index 0136c6aa57..8a54f198ab 100755
--- a/tools/profiling/microbenchmarks/bm_diff/bm_main.py
+++ b/tools/profiling/microbenchmarks/bm_diff/bm_main.py
@@ -126,8 +126,10 @@ def main(args):
text = 'Performance differences noted:\n' + diff
else:
text = 'No significant performance differences'
- print('%s\n%s' % (note, text))
- comment_on_pr.comment_on_pr('```\n%s\n\n%s\n```' % (note, text))
+ if note:
+ text = note + '\n\n' + text
+ print('%s' % text)
+ comment_on_pr.comment_on_pr('```\n%s\n```' % text)
if __name__ == '__main__':
diff --git a/tools/run_tests/sanity/core_banned_functions.py b/tools/run_tests/sanity/core_banned_functions.py
index a214eb59e5..b394bbbeaf 100755
--- a/tools/run_tests/sanity/core_banned_functions.py
+++ b/tools/run_tests/sanity/core_banned_functions.py
@@ -36,6 +36,11 @@ BANNED_EXCEPT = {
'grpc_wsa_error(': ['src/core/lib/iomgr/error.c'],
'grpc_log_if_error(': ['src/core/lib/iomgr/error.c'],
'grpc_slice_malloc(': ['src/core/lib/slice/slice.c'],
+ 'grpc_closure_create(' : ['src/core/lib/iomgr/closure.c'],
+ 'grpc_closure_init(' : ['src/core/lib/iomgr/closure.c'],
+ 'grpc_closure_sched(' : ['src/core/lib/iomgr/closure.c'],
+ 'grpc_closure_run(' : ['src/core/lib/iomgr/closure.c'],
+ 'grpc_closure_list_sched(' : ['src/core/lib/iomgr/closure.c'],
}
errors = 0