Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 0231a08

Browse files
bwilkersoncommit-bot@chromium.org
authored andcommitted
Fix a bug in completion metrics
I found this while testing a change to the computation of the completion location in `OpType`. The experiment started producing a completion location that wasn't previously produced, and that's what led to it being a key for one set of data but not in the other set of data. Change-Id: I3938ae68ec61afbef98d9674c7d6377fa4120d4a Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/211100 Reviewed-by: Konstantin Shcheglov <[email protected]> Commit-Queue: Brian Wilkerson <[email protected]>
1 parent 24c3530 commit 0231a08

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

pkg/analysis_server/tool/code_completion/completion_metrics.dart

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1071,8 +1071,9 @@ class CompletionMetricsComputer {
10711071
.toList();
10721072
locations.sort();
10731073
for (var location in locations) {
1074-
table.add(toRow(targetMetrics
1075-
.map((metrics) => metrics.locationMrrComputers[location]!)));
1074+
table.add(toRow(targetMetrics.map((metrics) =>
1075+
metrics.locationMrrComputers[location] ??
1076+
MeanReciprocalRankComputer(location))));
10761077
}
10771078
}
10781079
rightJustifyColumns(table, range(1, table[0].length));

0 commit comments

Comments
 (0)