Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Q
QMLBench Regression Finder
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Daniel Smith
QMLBench Regression Finder
Commits
ac31e561
Commit
ac31e561
authored
Oct 07, 2019
by
Daniel Smith
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update completed jobs results to show performance improvements correctly.
parent
93bab68b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
4 deletions
+24
-4
server.js
server.js
+24
-4
No files found.
server.js
View file @
ac31e561
...
...
@@ -230,6 +230,16 @@ notifyJob.on('JobDone', function(){
function
jobFormatter
(
job
,
format
){
// Do some formatting magic
function
resultText
(
result
){
if
(
result
<
0
){
return
`Observed improvement:
${
Math
.
abs
(
result
)}
%`
;
}
else
if
(
result
>
0
){
return
`Observed regression:
${
result
}
%`
;
}
else
{
return
"
-- No change in score --
"
;
}
}
const
commitString
=
job
.
commit
?
job
.
commit
:
job
.
firstCommit
?
job
.
firstCommit
.
slice
(
0
,
10
)
+
'
..
'
+
job
.
secondCommit
.
slice
(
0
,
10
)
:
job
.
good_commit
.
slice
(
0
,
10
)
+
'
..
'
+
job
.
bad_commit
.
slice
(
0
,
10
);
const
backendString
=
job
.
platform
==
'
win32
'
&&
job
.
openGLBackend
?
` - Open GL Backend:
${
job
.
openGLBackend
}
`
:
''
;
var
resultString
=
''
;
...
...
@@ -241,7 +251,7 @@ notifyJob.on('JobDone', function(){
resultString
=
`Results<br>
First commit result (
${
job
.
firstCommit
.
slice
(
0
,
10
)}
):
${
job
.
resultJSON
.
finalResults
[
0
]}
<br>
Second commit result (
${
job
.
secondCommit
.
slice
(
0
,
10
)}
):
${
job
.
resultJSON
.
finalResults
[
1
]}
<br>
Observed regression:
${
job
.
resultJSON
.
finalResults
[
2
]
}
%`
;
${
resultText
(
job
.
resultJSON
.
finalResults
[
2
])
}
%`
;
}
else
if
(
job
.
testType
==
'
bisect
'
){
const
bisectResult
=
job
.
resultJSON
.
bisectResults
[
1
].
length
>
1
?
`Bisect returned multiple commits. This is probably due to skipped commits.<br>
...
...
@@ -253,7 +263,7 @@ notifyJob.on('JobDone', function(){
resultString
=
`Results<br>
Good commit result (
${
job
.
good_commit
.
slice
(
0
,
10
)}
):
${
job
.
resultJSON
.
baselineResults
[
0
]}
<br>
Bad commit result (
${
job
.
bad_commit
.
slice
(
0
,
10
)}
):
${
job
.
resultJSON
.
baselineResults
[
1
]}
<br>
Observed regression:
${
job
.
resultJSON
.
baselineResults
[
2
]
}
%<br>
${
resultText
(
job
.
resultJSON
.
baselineResults
[
2
])
}
%<br>
${
bisectResult
}
Tested Commits raw results:<br>
${
JSON
.
stringify
(
job
.
resultJSON
.
bisectResults
[
0
],
null
,
'
'
).
replace
(
/
\n
/g
,
'
<br>
'
)}
<br><br>
...
...
@@ -1384,6 +1394,16 @@ function homePage(req, res){
function
jobFormatter
(
job
){
// Dynamically format a job for display on the page
function
resultText
(
result
){
if
(
result
<
0
){
return
`Observed improvement:
${
Math
.
abs
(
result
)}
%`
;
}
else
if
(
result
>
0
){
return
`Observed regression:
${
result
}
%`
;
}
else
{
return
"
-- No change in score --
"
;
}
}
const
commitString
=
job
.
commit
?
job
.
commit
:
job
.
firstCommit
?
job
.
firstCommit
.
slice
(
0
,
10
)
+
'
..
'
+
job
.
secondCommit
.
slice
(
0
,
10
)
:
job
.
good_commit
?
job
.
good_commit
.
slice
(
0
,
10
)
+
'
..
'
+
job
.
bad_commit
.
slice
(
0
,
10
)
:
''
;
const
backendString
=
job
.
platform
==
'
win32
'
&&
job
.
openGLBackend
?
` - Open GL Backend:
${
job
.
openGLBackend
}
`
:
''
;
var
resultString
=
''
;
...
...
@@ -1393,7 +1413,7 @@ function homePage(req, res){
}
else
if
(
job
.
testType
==
'
twoCommit
'
){
resultString
=
`<b>Results: </b>First commit result (
${
job
.
firstCommit
.
slice
(
0
,
10
)}
):
${
job
.
resultJSON
.
finalResults
[
0
]}
,
Second commit result (
${
job
.
secondCommit
.
slice
(
0
,
10
)}
):
${
job
.
resultJSON
.
finalResults
[
1
]}
<br>
Observed regression:
${
job
.
resultJSON
.
finalResults
[
2
]}
%
`
;
${
resultText
(
job
.
resultJSON
.
finalResults
[
2
])}
`
;
}
if
(
job
.
testType
==
'
bisect
'
){
const
bisectResult
=
job
.
resultJSON
.
bisectResults
[
1
].
length
>
1
?
...
...
@@ -1404,7 +1424,7 @@ function homePage(req, res){
resultString
=
`<b>Results: </b>Good commit result (
${
job
.
good_commit
.
slice
(
0
,
10
)}
):
${
job
.
resultJSON
.
baselineResults
[
0
]}
,
Bad commit result (
${
job
.
bad_commit
.
slice
(
0
,
10
)}
):
${
job
.
resultJSON
.
baselineResults
[
1
]}
<br>
Observed regression:
${
job
.
resultJSON
.
baselineResults
[
2
]}
%
<br>
${
resultText
(
job
.
resultJSON
.
baselineResults
[
2
])}
<br>
${
bisectResult
}
`
;
}
...
...
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