diff options
author | Craig Tiller <ctiller@google.com> | 2017-03-01 13:32:33 -0800 |
---|---|---|
committer | Craig Tiller <ctiller@google.com> | 2017-03-01 13:32:33 -0800 |
commit | 4883fd8a20d4ddb49f772f557c870f6d7b9d989a (patch) | |
tree | e0026668f65cc43ab41c22edc75f7f72aefd7dd9 /tools/profiling/microbenchmarks/bm2bq.py | |
parent | 8d9d4d00fd1fb312d20953176fc0b2d3f33d1825 (diff) | |
parent | 07ad1b9c7c785554b6734eb5c0e2fcd2b14691b2 (diff) |
Merge github.com:grpc/grpc into call_create_fixtures
Diffstat (limited to 'tools/profiling/microbenchmarks/bm2bq.py')
-rwxr-xr-x | tools/profiling/microbenchmarks/bm2bq.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tools/profiling/microbenchmarks/bm2bq.py b/tools/profiling/microbenchmarks/bm2bq.py index 1ca0964f64..a83b3be89c 100755 --- a/tools/profiling/microbenchmarks/bm2bq.py +++ b/tools/profiling/microbenchmarks/bm2bq.py @@ -80,6 +80,12 @@ if sys.argv[1] == '--schema': with open(sys.argv[1]) as f: js = json.loads(f.read()) +if len(sys.argv) > 2: + with open(sys.argv[2]) as f: + js2 = json.loads(f.read()) +else: + js2 = None + writer = csv.DictWriter(sys.stdout, [c for c,t in columns]) bm_specs = { @@ -219,4 +225,10 @@ for bm in js['benchmarks']: row.update(labels) if 'label' in row: del row['label'] + if js2: + for bm2 in js2['benchmarks']: + if bm['name'] == bm2['name']: + row['cpu_time'] = bm2['cpu_time'] + row['real_time'] = bm2['real_time'] + row['iterations'] = bm2['iterations'] writer.writerow(row) |