diff options
author | Jan Tattermusch <jtattermusch@google.com> | 2018-05-18 15:33:25 +0200 |
---|---|---|
committer | Jan Tattermusch <jtattermusch@google.com> | 2018-05-18 15:33:25 +0200 |
commit | d8f9fe844f36e524e8ff3db66a2998b72adb80d8 (patch) | |
tree | 980476ab2a7f4d4c1ee5b9842b9e62971560978d /tools/codegen | |
parent | bdbf04cde1f429787c41013071dea12c6ab2088e (diff) |
get rid of premature return in massage_qps_stats
Diffstat (limited to 'tools/codegen')
-rwxr-xr-x | tools/codegen/core/gen_stats_data.py | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/tools/codegen/core/gen_stats_data.py b/tools/codegen/core/gen_stats_data.py index 33faeafc16..0f61c3e237 100755 --- a/tools/codegen/core/gen_stats_data.py +++ b/tools/codegen/core/gen_stats_data.py @@ -445,18 +445,20 @@ with open('tools/run_tests/performance/massage_qps_stats.py', 'w') as P: print >> P, 'def massage_qps_stats(scenario_result):' print >> P, ' for stats in scenario_result["serverStats"] + scenario_result["clientStats"]:' - print >> P, ' if "coreStats" not in stats: return' - print >> P, ' core_stats = stats["coreStats"]' - print >> P, ' del stats["coreStats"]' + print >> P, ' if "coreStats" in stats:' + print >> P, ' # Get rid of the "coreStats" element and replace it by statistics' + print >> P, ' # that correspond to columns in the bigquery schema.' + print >> P, ' core_stats = stats["coreStats"]' + print >> P, ' del stats["coreStats"]' for counter in inst_map['Counter']: - print >> P, ' stats["core_%s"] = massage_qps_stats_helpers.counter(core_stats, "%s")' % ( + print >> P, ' stats["core_%s"] = massage_qps_stats_helpers.counter(core_stats, "%s")' % ( counter.name, counter.name) for i, histogram in enumerate(inst_map['Histogram']): - print >> P, ' h = massage_qps_stats_helpers.histogram(core_stats, "%s")' % histogram.name - print >> P, ' stats["core_%s"] = ",".join("%%f" %% x for x in h.buckets)' % histogram.name - print >> P, ' stats["core_%s_bkts"] = ",".join("%%f" %% x for x in h.boundaries)' % histogram.name + print >> P, ' h = massage_qps_stats_helpers.histogram(core_stats, "%s")' % histogram.name + print >> P, ' stats["core_%s"] = ",".join("%%f" %% x for x in h.buckets)' % histogram.name + print >> P, ' stats["core_%s_bkts"] = ",".join("%%f" %% x for x in h.boundaries)' % histogram.name for pctl in RECORD_EXPLICIT_PERCENTILES: - print >> P, ' stats["core_%s_%dp"] = massage_qps_stats_helpers.percentile(h.buckets, %d, h.boundaries)' % ( + print >> P, ' stats["core_%s_%dp"] = massage_qps_stats_helpers.percentile(h.buckets, %d, h.boundaries)' % ( histogram.name, pctl, pctl) with open('src/core/lib/debug/stats_data_bq_schema.sql', 'w') as S: |