@@ -94,6 +94,7 @@ function createChart(data, containerId, type) {
94
94
`Value: ${ point . y . toFixed ( 2 ) } ${ data . unit } ` ,
95
95
`Stddev: ${ point . stddev . toFixed ( 2 ) } ${ data . unit } ` ,
96
96
`Git Hash: ${ point . gitHash } ` ,
97
+ `Compute Runtime: ${ point . compute_runtime } ` ,
97
98
] ;
98
99
} else {
99
100
return [ `${ context . dataset . label } :` ,
@@ -147,7 +148,7 @@ function createChart(data, containerId, type) {
147
148
const chartConfig = {
148
149
type : type === 'time' ? 'line' : 'bar' ,
149
150
data : type === 'time' ? {
150
- datasets : createTimeseriesDatasets ( data )
151
+ datasets : Object . values ( data . runs )
151
152
} : {
152
153
labels : data . labels ,
153
154
datasets : data . datasets
@@ -692,36 +693,32 @@ function processLayerComparisonsData(benchmarkRuns) {
692
693
return Object . values ( groupedResults ) ;
693
694
}
694
695
695
- function createRunDataStructure ( run , result , label ) {
696
- return {
697
- runName : run . name ,
698
- points : [ {
699
- date : new Date ( run . date ) ,
700
- value : result . value ,
701
- stddev : result . stddev ,
702
- git_hash : run . git_hash ,
703
- github_repo : run . github_repo ,
704
- label : label || result . label
705
- } ]
706
- } ;
707
- }
708
-
709
696
function addRunDataPoint ( group , run , result , name = null ) {
710
697
const runKey = name || result . label + ' (' + run . name + ')' ;
711
698
712
699
if ( ! group . runs [ runKey ] ) {
700
+ const datasetIndex = Object . keys ( group . runs ) . length ;
713
701
group . runs [ runKey ] = {
702
+ label : runKey ,
714
703
runName : run . name ,
715
- points : [ ]
704
+ data : [ ] ,
705
+ borderColor : colorPalette [ datasetIndex % colorPalette . length ] ,
706
+ backgroundColor : colorPalette [ datasetIndex % colorPalette . length ] ,
707
+ borderWidth : 1 ,
708
+ pointRadius : 3 ,
709
+ pointStyle : 'circle' ,
710
+ pointHoverRadius : 5
716
711
} ;
717
712
}
718
713
719
- group . runs [ runKey ] . points . push ( {
720
- date : new Date ( run . date ) ,
721
- value : result . value ,
714
+ group . runs [ runKey ] . data . push ( {
715
+ seriesName : runKey ,
716
+ x : new Date ( run . date ) ,
717
+ y : result . value ,
722
718
stddev : result . stddev ,
723
- git_hash : run . git_hash ,
724
- github_repo : run . github_repo ,
719
+ gitHash : run . git_hash ,
720
+ gitRepo : run . github_repo ,
721
+ compute_runtime : run . compute_runtime
725
722
} ) ;
726
723
727
724
return group ;
0 commit comments