aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/codegen/core/gen_stats_data.py
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2017-09-12 13:15:58 -0700
committerGravatar Craig Tiller <ctiller@google.com>2017-09-12 13:15:58 -0700
commit5d6156033e2fff01abd6b01b49626fed95a6d81e (patch)
treeb007e3b9949ddb3b22c4ade24b2c292e7a6b2c1a /tools/codegen/core/gen_stats_data.py
parent9a009f776f5f57da59deff3836f100012ae34675 (diff)
Review feedback
Diffstat (limited to 'tools/codegen/core/gen_stats_data.py')
-rwxr-xr-xtools/codegen/core/gen_stats_data.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/tools/codegen/core/gen_stats_data.py b/tools/codegen/core/gen_stats_data.py
index f665b5808e..985c1f51c9 100755
--- a/tools/codegen/core/gen_stats_data.py
+++ b/tools/codegen/core/gen_stats_data.py
@@ -395,8 +395,9 @@ with open('tools/run_tests/performance/massage_qps_stats.py', 'w') as P:
for counter in inst_map['Counter']:
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, ' stats["core_%s"] = ",".join("%%f" %% x for x in massage_qps_stats_helpers.histogram(core_stats, "%s").buckets)' % (histogram.name, histogram.name)
- print >>P, ' stats["core_%s_bkts"] = ",".join("%%f" %% x for x in massage_qps_stats_helpers.histogram(core_stats, "%s").boundaries)' % (histogram.name, 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(massage_qps_stats_helpers.histogram(core_stats, "%s").buckets, %d, massage_qps_stats_helpers.histogram(core_stats, "%s").boundaries)' % (
- histogram.name, pctl, histogram.name, pctl, histogram.name)
+ print >>P, ' stats["core_%s_%dp"] = massage_qps_stats_helpers.percentile(h.buckets, %d, h.boundaries)' % (
+ histogram.name, pctl, pctl)