|
27 | 27 |
|
28 | 28 | --summary-every-other-row-color: #F8F8F8; |
29 | 29 | --highlight-color: #EEE; |
| 30 | + |
| 31 | + --bar-color1: oklch(calc(0.9 - 0.6) 0.1 calc(90 - 60)); |
| 32 | + --bar-color2: oklch(calc(0.9 - 0.4) 0.1 calc(90 - 40)); |
| 33 | + --bar-color3: oklch(calc(0.9 - 0.1) 0.1 calc(90 - 20)); |
| 34 | + --bar-color4: oklch(0.9 0.1 90); |
| 35 | + |
30 | 36 | --bar-color: #FFCB80; |
31 | 37 | --fake-bar-color: #CCC; |
32 | 38 |
|
|
54 | 60 |
|
55 | 61 | --summary-every-other-row-color: #042e41; |
56 | 62 | --highlight-color: #064663; |
| 63 | + |
| 64 | + --bar-color1: oklch(calc(0.4 + 0.6) 0.1 calc(250 - 180)); |
| 65 | + --bar-color2: oklch(calc(0.4 + 0.4) 0.1 calc(250 - 120)); |
| 66 | + --bar-color3: oklch(calc(0.4 + 0.2) 0.1 calc(250 - 60)); |
| 67 | + --bar-color4: oklch(0.4 0.1 250); |
| 68 | + |
57 | 69 | --bar-color: #088; |
58 | 70 | --fake-bar-color: #666; |
59 | 71 |
|
|
155 | 167 |
|
156 | 168 | .summary-bar { |
157 | 169 | height: 1rem; |
158 | | - background: var(--bar-color); |
159 | | - border-radius: 0 0.2rem 0.2rem 0; |
| 170 | + width: 100%; |
160 | 171 | } |
161 | 172 |
|
162 | 173 | .summary-bar-fake { |
|
287 | 298 | transform: translate(1px, 1px); |
288 | 299 | filter: brightness(125%); |
289 | 300 | } |
| 301 | + |
| 302 | + #scale_hint { |
| 303 | + font-weight: normal; |
| 304 | + font-size: 80%; |
| 305 | + filter: contrast(10%); |
| 306 | + } |
290 | 307 | </style> |
291 | 308 | <script type="text/javascript"> |
292 | 309 |
|
@@ -430,7 +447,8 @@ <h1>JSONBench — a Benchmark For Data Analytics On JSON</h1> |
430 | 447 | System |
431 | 448 | </th> |
432 | 449 | <th colspan="2"> |
433 | | - <span id="metric-title">Relative time (lower is better)</span> |
| 450 | + <span id="metric-title">Relative time (lower is better)</span>.<br/> |
| 451 | + <span id="scale_hint"></span> |
434 | 452 | </th> |
435 | 453 | </tr> |
436 | 454 | </thead> |
@@ -739,7 +757,21 @@ <h2>Detailed Comparison</h2> |
739 | 757 | let bar = document.createElement('div'); |
740 | 758 |
|
741 | 759 | bar.className = elem.fake ? `summary-bar-fake` : `summary-bar`; |
742 | | - bar.style.width = `${percentage}%`; |
| 760 | + if (elem.fake) { |
| 761 | + bar.style.width = `${percentage}%`; |
| 762 | + } else { |
| 763 | + bar.style.background = `linear-gradient(to right, |
| 764 | + var(--bar-color1) 0%, |
| 765 | + var(--bar-color1) ${Math.min(100, percentage)}%, |
| 766 | + var(--bar-color2) ${Math.min(100, percentage)}%, |
| 767 | + var(--bar-color2) ${Math.min(100, percentage * 10)}%, |
| 768 | + var(--bar-color3) ${Math.min(100, percentage * 10)}%, |
| 769 | + var(--bar-color3) ${Math.min(100, percentage * 100)}%, |
| 770 | + var(--bar-color4) ${Math.min(100, percentage * 100)}%, |
| 771 | + var(--bar-color4) ${Math.min(100, percentage * 1000)}%, |
| 772 | + transparent ${Math.min(100, percentage * 1000)}%, |
| 773 | + transparent 100%)`; |
| 774 | + } |
743 | 775 |
|
744 | 776 | td_bar.appendChild(bar); |
745 | 777 |
|
@@ -950,6 +982,9 @@ <h2>Detailed Comparison</h2> |
950 | 982 |
|
951 | 983 | details_body.appendChild(tr); |
952 | 984 | } |
| 985 | + |
| 986 | + /// The small hint below column heading "Relative time (lower is better)" |
| 987 | + document.getElementById("scale_hint").textContent = 'Different colors on the bar chart represent the same values shown at different scales (1x, 10x, 100x zoom)'; |
953 | 988 | } |
954 | 989 |
|
955 | 990 | function updateHistory() { |
|
0 commit comments