Skip to content

Commit 89ffd2c

Browse files
authored
Enabled Dacapo on Dashboard (adoptium#1058)
* Enabled Dacapo on Dashboard Dacapo.jsx matches new datastructure: 1. Since jdkDate is null, derive it from t.timestamp. 2. Extract metric with respect to test.duration and test.benchmarkName instead of tests.testData.metrics Notes for possible related issues: -Can optimize the code, currently I believe there are wasteful null values in resultsByJDKBuild due to change 2. -Current code assumes only one iteration per benchmark, but there could be multiple iterations. Fixes: adoptium#1049 Signed-off-by: Matthew Wei <mwei2@andrew.cmu.edu> * removed t.jdkDate case --------- Signed-off-by: Matthew Wei <mwei2@andrew.cmu.edu>
1 parent e3d7f6a commit 89ffd2c

File tree

1 file changed

+14
-22
lines changed
  • test-result-summary-client/src/Dashboard/Widgets/Graph

1 file changed

+14
-22
lines changed

test-result-summary-client/src/Dashboard/Widgets/Graph/Dacapo.jsx

Lines changed: 14 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ export default class Dacapo extends Component {
4444
let results = await fetchData(
4545
`/api/getBuildHistory?type=Perf&buildName=${buildName}&status=Done&limit=100&asc`
4646
);
47-
4847
const buildInfoMap = await fetchData(`/api/getDashboardBuildInfo`);
4948

5049
if (serverSelected) {
@@ -66,33 +65,26 @@ export default class Dacapo extends Component {
6665

6766
// combine results having the same JDK build date
6867
results.forEach((t, i) => {
69-
let jdkDate = t.jdkDate;
68+
//t.jdkDate is currently not in use
69+
let jdkDate = (t.timestamp ? new Date(t.timestamp).toISOString().slice(0,10) : null);
7070
if (t.buildResult !== 'SUCCESS' || !jdkDate) return;
71-
jdkDate = jdkDate.replaceAll('-', '');
71+
jdkDate = ' ' + jdkDate.replaceAll('-', '');
7272
resultsByJDKBuild[jdkDate] = resultsByJDKBuild[jdkDate] || [];
7373
t.tests.forEach((test, i) => {
7474
let eclipse = null;
7575
let h2 = null;
7676
let lusearch = null;
77+
78+
if (test.benchmarkName === 'dacapo-eclipse') {
79+
eclipse = test.duration
80+
}
7781

78-
if (
79-
!test.testName.startsWith('dacapo') ||
80-
!test.testData ||
81-
!test.testData.metrics
82-
)
83-
return;
84-
85-
test.testData.metrics.forEach((metric, i) => {
86-
if (metric.name === 'eclipse') {
87-
eclipse = metric.value[0];
88-
}
89-
if (metric.name === 'h2') {
90-
h2 = metric.value[0];
91-
}
92-
if (metric.name === 'lusearch-fix') {
93-
lusearch = metric.value[0];
94-
}
95-
});
82+
if (test.benchmarkName === 'dacapo-h2') {
83+
h2 = test.duration
84+
}
85+
if (test.benchmarkName === 'dacapo-lusearch-fix') {
86+
lusearch = test.duration
87+
}
9688

9789
if (!eclipse && !h2 && !lusearch) {
9890
return;
@@ -107,7 +99,7 @@ export default class Dacapo extends Component {
10799
buildName: t.buildName,
108100
buildNum: t.buildNum,
109101
javaVersion: t.javaVersion,
110-
jdkDate: t.jdkDate,
102+
jdkDate: jdkDate,
111103
},
112104
});
113105
});

0 commit comments

Comments
 (0)