|
73 | 73 | </a> |
74 | 74 |
|
75 | 75 | <script> |
76 | | - const seriesColors = ["#7cb5ec", "#434348", "#90ed7d", "#f7a35c", "#8085e9", "#f15c80", "#e4d354", "#2b908f", "#f45b5b", "#91e8e1"]; |
| 76 | + const commonCacheStateColors = { |
| 77 | + "full": "#7cb5ec", |
| 78 | + "incr-full": "#434348", |
| 79 | + "incr-unchanged": "#f7a35c", |
| 80 | + "incr-patched: println": "#90ed7d", |
| 81 | + }; |
| 82 | + |
| 83 | + const otherCacheStateColors = ["#8085e9", "#f15c80", "#e4d354", "#2b908f", "#f45b5b", "#91e8e1"]; |
77 | 84 | const interpolatedColor = "#fcb0f1"; |
78 | 85 |
|
79 | 86 | function tooltipPlugin({onclick, commits, isInterpolated, absoluteMode, shiftX = 10, shiftY = 10}) { |
|
95 | 102 | tooltip.style.top = (tooltipTopOffset + top + shiftX) + "px"; |
96 | 103 | tooltip.style.left = (tooltipLeftOffset + lft + shiftY) + "px"; |
97 | 104 |
|
98 | | - tooltip.style.borderColor = isInterpolated(dataIdx) ? interpolatedColor : seriesColors[seriesIdx - 1]; |
| 105 | + tooltip.style.borderColor = isInterpolated(dataIdx) ? interpolatedColor : "#000000"; |
99 | 106 | let trailer = ""; |
100 | 107 | if (absoluteMode) { |
101 | 108 | let pctSinceStart = (((u.data[seriesIdx][dataIdx] - u.data[seriesIdx][0]) / u.data[seriesIdx][0]) * 100).toFixed(2); |
|
267 | 274 |
|
268 | 275 | for (let benchKind in benchKinds) { |
269 | 276 | let cacheStates = benchKinds[benchKind]; |
| 277 | + let cacheStateNames = Object.keys(cacheStates); |
| 278 | + cacheStateNames.sort(); |
270 | 279 |
|
271 | 280 | let yAxis = "Value"; |
272 | 281 | if (state.stat == "instructions:u") { |
|
294 | 303 |
|
295 | 304 | let plotData = [xVals]; |
296 | 305 |
|
297 | | - let j = 0; |
| 306 | + let otherColorIdx = 0; |
298 | 307 |
|
299 | | - for (let cacheState in cacheStates) { |
| 308 | + for (let cacheState of cacheStateNames) { |
300 | 309 | let yVals = cacheStates[cacheState].points; |
| 310 | + let color = commonCacheStateColors[cacheState] || otherCacheStateColors[otherColorIdx++]; |
301 | 311 |
|
302 | 312 | plotData.push(yVals); |
303 | 313 |
|
304 | 314 | seriesOpts.push({ |
305 | 315 | label: cacheState, |
306 | 316 | width: devicePixelRatio, |
307 | | - stroke: seriesColors[j] |
| 317 | + stroke: color |
308 | 318 | }); |
309 | | - |
310 | | - j++; |
311 | 319 | } |
312 | 320 |
|
313 | 321 | let plotOpts = genPlotOpts({ |
|
0 commit comments