aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvelina Dumitrescu <evelinad@google.com>2016-10-13 20:33:57 -0700
committerchrome-bot <chrome-bot@chromium.org>2017-02-01 18:13:44 -0800
commit86c1c0b9354bc7ae4ca8bb3557459b1b9540e771 (patch)
tree5e5ff196c3e6dea2dc07ee8abe267412dfab25a7
parent63dce8585d339dffcda92ab05c79fbb4409796cc (diff)
downloadtoolchain-utils-86c1c0b9354bc7ae4ca8bb3557459b1b9540e771.tar.gz
user_activity: Fixed a regression in ComputeScoreForBenchmarkSet.
The score fraction for a group was computed wrong. The fraction should be computed as the score of the group over the score of that group in the ideal case (each CWP function matching that group should have the 1.0 value). BUG=None TEST=None Change-Id: I294b42f0c8112ab9bd6f5d983876b6d779aad5e4 Reviewed-on: https://chrome-internal-review.googlesource.com/297675 Tested-by: Evelina Dumitrescu <evelinad@google.com> Reviewed-by: Evelina Dumitrescu <evelinad@google.com> Reviewed-by: Luis Lozano <llozano@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/435921 Commit-Ready: Luis Lozano <llozano@chromium.org> Tested-by: Luis Lozano <llozano@chromium.org>
-rw-r--r--user_activity_benchmarks/benchmark_metrics.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/user_activity_benchmarks/benchmark_metrics.py b/user_activity_benchmarks/benchmark_metrics.py
index 0b82e965..30ae31e0 100644
--- a/user_activity_benchmarks/benchmark_metrics.py
+++ b/user_activity_benchmarks/benchmark_metrics.py
@@ -295,7 +295,7 @@ def ComputeScoreForBenchmarkSet(set_function_metrics, cwp_functions,
groups_scores = defaultdict(lambda: (0.0, 0.0))
for group_name, function_scores in set_unique_functions.iteritems():
- group_function_count = len(function_scores)
+ group_function_count = float(len(cwp_functions[group_name]))
group_score = sum(function_scores.itervalues())
total_score += group_score
groups_scores[group_name] = {