Added ability to show minimum FPS for FPS tests; added title to benchmark charts
This commit is contained in:
		| @@ -22,12 +22,32 @@ $ -> | ||||
|  | ||||
|     data = | ||||
|       labels: [] | ||||
|       datasets: [ | ||||
|         { | ||||
|       datasets: [] | ||||
|  | ||||
|     switch benchmarkData.scoring | ||||
|       when 'pts' | ||||
|         data.datasets.push({ | ||||
|           label: 'Average Score' | ||||
|           data: [] | ||||
|         } | ||||
|       ] | ||||
|         }) | ||||
|       when 'fps' | ||||
|         data.datasets.push({ | ||||
|           label: 'Average FPS' | ||||
|           data: [] | ||||
|         }) | ||||
|         data.datasets.push({ | ||||
|           label: 'Minimum FPS' | ||||
|           data: [] | ||||
|         }) | ||||
|       when 'ms' | ||||
|         data.datasets.push({ | ||||
|           label: 'Average Frame Time' | ||||
|           data: [] | ||||
|         }) | ||||
|         data.datasets.push({ | ||||
|           label: 'Minimum Frame Time' | ||||
|           data: [] | ||||
|         }) | ||||
|  | ||||
|     for testId in testIds | ||||
|       try | ||||
| @@ -53,6 +73,9 @@ $ -> | ||||
|  | ||||
|         data.labels.push(testData.title) | ||||
|         data.datasets[0].data.push(avg_total / resultData.length) | ||||
|         switch benchmarkData.scoring | ||||
|           when 'fps', 'ms' | ||||
|             data.datasets[1].data.push(min_total / resultData.length) | ||||
|       catch error | ||||
|         console.error 'An error occurred while fetching benchmark results.', error | ||||
|  | ||||
| @@ -61,6 +84,11 @@ $ -> | ||||
|     options = | ||||
|       indexAxis: 'y' | ||||
|       plugins: | ||||
|         title: | ||||
|           display: true | ||||
|           text: benchmarkData.name | ||||
|           font: | ||||
|             size: '24' | ||||
|         datalabels: | ||||
|           anchor: 'end' | ||||
|           align: 'left' | ||||
| @@ -79,4 +107,4 @@ $ -> | ||||
|       plugins: [ChartDataLabels] | ||||
|  | ||||
|     $('#reports-download').attr('disabled', false) | ||||
|     $('#benchmark-chart')[0].removeClass('disabled') | ||||
|     $('#benchmark-chart').removeClass('disabled') | ||||
|   | ||||
		Reference in New Issue
	
	Block a user