Stop sending metrics to builder name (#92989)
This commit is contained in:
parent
0815da4d38
commit
33be68d9bf
@ -63,14 +63,13 @@ List<MetricPoint> parse(Map<String, dynamic> resultsJson, Map<String, dynamic> b
|
||||
resultsJson['ResultData'] as Map<String, dynamic>? ?? const <String, dynamic>{};
|
||||
final String gitBranch = (resultsJson['CommitBranch'] as String).trim();
|
||||
final String gitSha = (resultsJson['CommitSha'] as String).trim();
|
||||
final String builderName = (resultsJson['BuilderName'] as String).trim();
|
||||
final List<MetricPoint> metricPoints = <MetricPoint>[];
|
||||
for (final String scoreKey in scoreKeys) {
|
||||
Map<String, String> tags = <String, String>{
|
||||
kGithubRepoKey: kFlutterFrameworkRepo,
|
||||
kGitRevisionKey: gitSha,
|
||||
'branch': gitBranch,
|
||||
kNameKey: builderName,
|
||||
kNameKey: taskName,
|
||||
kSubResultKey: scoreKey,
|
||||
};
|
||||
// Append additional benchmark tags, which will surface in Skia Perf dashboards.
|
||||
@ -82,18 +81,6 @@ List<MetricPoint> parse(Map<String, dynamic> resultsJson, Map<String, dynamic> b
|
||||
tags,
|
||||
),
|
||||
);
|
||||
|
||||
// Add an extra entry under test name. This way we have duplicate metrics
|
||||
// under both builder name and test name. Once we have enough data and update
|
||||
// existing alerts to point to test name, we can deprecate builder name ones.
|
||||
// https://github.com/flutter/flutter/issues/74522#issuecomment-942575581
|
||||
tags[kNameKey] = taskName;
|
||||
metricPoints.add(
|
||||
MetricPoint(
|
||||
(resultData[scoreKey] as num).toDouble(),
|
||||
tags,
|
||||
),
|
||||
);
|
||||
}
|
||||
return metricPoints;
|
||||
}
|
||||
|
@ -38,11 +38,9 @@ void main() {
|
||||
};
|
||||
final List<MetricPoint> metricPoints = parse(results, <String, String>{}, 'test');
|
||||
|
||||
expect(metricPoints.length, 2);
|
||||
expect(metricPoints.length, 1);
|
||||
expect(metricPoints[0].value, equals(0.4550425531914895));
|
||||
expect(metricPoints[0].tags[kNameKey], 'Linux test');
|
||||
expect(metricPoints[1].value, equals(0.4550425531914895));
|
||||
expect(metricPoints[1].tags[kNameKey], 'test');
|
||||
expect(metricPoints[0].tags[kNameKey], 'test');
|
||||
});
|
||||
|
||||
test('without additional benchmark tags', () {
|
||||
@ -62,7 +60,7 @@ void main() {
|
||||
final List<MetricPoint> metricPoints = parse(results, <String, String>{}, 'task abc');
|
||||
|
||||
expect(metricPoints[0].value, equals(0.4550425531914895));
|
||||
expect(metricPoints[2].value, equals(0.473));
|
||||
expect(metricPoints[1].value, equals(0.473));
|
||||
});
|
||||
|
||||
test('with additional benchmark tags', () {
|
||||
@ -90,8 +88,8 @@ void main() {
|
||||
|
||||
expect(metricPoints[0].value, equals(0.4550425531914895));
|
||||
expect(metricPoints[0].tags.keys.contains('arch'), isTrue);
|
||||
expect(metricPoints[2].value, equals(0.473));
|
||||
expect(metricPoints[2].tags.keys.contains('device_type'), isTrue);
|
||||
expect(metricPoints[1].value, equals(0.473));
|
||||
expect(metricPoints[1].tags.keys.contains('device_type'), isTrue);
|
||||
});
|
||||
|
||||
test('succeeds - null ResultData', () {
|
||||
|
Loading…
x
Reference in New Issue
Block a user