Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
33be68d9
Unverified
Commit
33be68d9
authored
Nov 05, 2021
by
keyonghan
Committed by
GitHub
Nov 05, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Stop sending metrics to builder name (#92989)
parent
0815da4d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
21 deletions
+6
-21
metrics_center.dart
dev/devicelab/lib/framework/metrics_center.dart
+1
-14
metrics_center_test.dart
dev/devicelab/test/metrics_center_test.dart
+5
-7
No files found.
dev/devicelab/lib/framework/metrics_center.dart
View file @
33be68d9
...
@@ -63,14 +63,13 @@ List<MetricPoint> parse(Map<String, dynamic> resultsJson, Map<String, dynamic> b
...
@@ -63,14 +63,13 @@ List<MetricPoint> parse(Map<String, dynamic> resultsJson, Map<String, dynamic> b
resultsJson
[
'ResultData'
]
as
Map
<
String
,
dynamic
>?
??
const
<
String
,
dynamic
>{};
resultsJson
[
'ResultData'
]
as
Map
<
String
,
dynamic
>?
??
const
<
String
,
dynamic
>{};
final
String
gitBranch
=
(
resultsJson
[
'CommitBranch'
]
as
String
).
trim
();
final
String
gitBranch
=
(
resultsJson
[
'CommitBranch'
]
as
String
).
trim
();
final
String
gitSha
=
(
resultsJson
[
'CommitSha'
]
as
String
).
trim
();
final
String
gitSha
=
(
resultsJson
[
'CommitSha'
]
as
String
).
trim
();
final
String
builderName
=
(
resultsJson
[
'BuilderName'
]
as
String
).
trim
();
final
List
<
MetricPoint
>
metricPoints
=
<
MetricPoint
>[];
final
List
<
MetricPoint
>
metricPoints
=
<
MetricPoint
>[];
for
(
final
String
scoreKey
in
scoreKeys
)
{
for
(
final
String
scoreKey
in
scoreKeys
)
{
Map
<
String
,
String
>
tags
=
<
String
,
String
>{
Map
<
String
,
String
>
tags
=
<
String
,
String
>{
kGithubRepoKey:
kFlutterFrameworkRepo
,
kGithubRepoKey:
kFlutterFrameworkRepo
,
kGitRevisionKey:
gitSha
,
kGitRevisionKey:
gitSha
,
'branch'
:
gitBranch
,
'branch'
:
gitBranch
,
kNameKey:
builder
Name
,
kNameKey:
task
Name
,
kSubResultKey:
scoreKey
,
kSubResultKey:
scoreKey
,
};
};
// Append additional benchmark tags, which will surface in Skia Perf dashboards.
// 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
...
@@ -82,18 +81,6 @@ List<MetricPoint> parse(Map<String, dynamic> resultsJson, Map<String, dynamic> b
tags
,
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
;
return
metricPoints
;
}
}
...
...
dev/devicelab/test/metrics_center_test.dart
View file @
33be68d9
...
@@ -38,11 +38,9 @@ void main() {
...
@@ -38,11 +38,9 @@ void main() {
};
};
final
List
<
MetricPoint
>
metricPoints
=
parse
(
results
,
<
String
,
String
>{},
'test'
);
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
].
value
,
equals
(
0.4550425531914895
));
expect
(
metricPoints
[
0
].
tags
[
kNameKey
],
'Linux test'
);
expect
(
metricPoints
[
0
].
tags
[
kNameKey
],
'test'
);
expect
(
metricPoints
[
1
].
value
,
equals
(
0.4550425531914895
));
expect
(
metricPoints
[
1
].
tags
[
kNameKey
],
'test'
);
});
});
test
(
'without additional benchmark tags'
,
()
{
test
(
'without additional benchmark tags'
,
()
{
...
@@ -62,7 +60,7 @@ void main() {
...
@@ -62,7 +60,7 @@ void main() {
final
List
<
MetricPoint
>
metricPoints
=
parse
(
results
,
<
String
,
String
>{},
'task abc'
);
final
List
<
MetricPoint
>
metricPoints
=
parse
(
results
,
<
String
,
String
>{},
'task abc'
);
expect
(
metricPoints
[
0
].
value
,
equals
(
0.4550425531914895
));
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'
,
()
{
test
(
'with additional benchmark tags'
,
()
{
...
@@ -90,8 +88,8 @@ void main() {
...
@@ -90,8 +88,8 @@ void main() {
expect
(
metricPoints
[
0
].
value
,
equals
(
0.4550425531914895
));
expect
(
metricPoints
[
0
].
value
,
equals
(
0.4550425531914895
));
expect
(
metricPoints
[
0
].
tags
.
keys
.
contains
(
'arch'
),
isTrue
);
expect
(
metricPoints
[
0
].
tags
.
keys
.
contains
(
'arch'
),
isTrue
);
expect
(
metricPoints
[
2
].
value
,
equals
(
0.473
));
expect
(
metricPoints
[
1
].
value
,
equals
(
0.473
));
expect
(
metricPoints
[
2
].
tags
.
keys
.
contains
(
'device_type'
),
isTrue
);
expect
(
metricPoints
[
1
].
tags
.
keys
.
contains
(
'device_type'
),
isTrue
);
});
});
test
(
'succeeds - null ResultData'
,
()
{
test
(
'succeeds - null ResultData'
,
()
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment