|
4 | 4 | <meta charset="utf-8">
|
5 | 5 | <title>rustc performance data</title>
|
6 | 6 | <link rel="stylesheet" type="text/css" href="perf.css">
|
| 7 | + <style> |
| 8 | + #charts { |
| 9 | + width: 100%; |
| 10 | + } |
| 11 | + div[id^="chart-container"] { |
| 12 | + max-width: 50%; |
| 13 | + } |
| 14 | + </style> |
7 | 15 | </head>
|
8 | 16 | <body class="container">
|
9 | 17 | <div>> <a href="index.html">graphs</a>, <a href="compare.html">compare</a>.</div>
|
|
55 | 63 | return false;
|
56 | 64 | }
|
57 | 65 |
|
58 |
| - let elements = []; |
| 66 | + let by_crate = {}; |
59 | 67 | for (let crate_name of sorted_names) {
|
60 |
| - let element = document.createElement("div"); |
61 |
| - element.id = "chart-container-" + crate_name; |
62 |
| - document.getElementById("charts").appendChild(element); |
| 68 | + let key = crate_name.replace("-opt", ""); |
| 69 | + if (!by_crate[key]) by_crate[key] = []; |
| 70 | + by_crate[key].push(crate_name); |
| 71 | + } |
| 72 | + for (let crate_names of Object.values(by_crate)) { |
| 73 | + let wrapper = document.createElement("table"); |
| 74 | + let row = document.createElement("tr"); |
| 75 | + wrapper.appendChild(row); |
| 76 | + for (let crate_name of crate_names) { |
| 77 | + let element = document.createElement("td"); |
| 78 | + element.id = "chart-container-" + crate_name; |
| 79 | + row.appendChild(element); |
| 80 | + } |
| 81 | + document.getElementById("charts").appendChild(wrapper); |
63 | 82 | }
|
64 | 83 | let graphs = [];
|
65 | 84 | for (let crate_name of sorted_names) {
|
66 | 85 | graphs.push(() => {
|
67 | 86 | let benchmark_names = Object.keys(response.benchmarks[crate_name]);
|
68 | 87 | benchmark_names.sort();
|
69 | 88 | let datasets = [];
|
| 89 | + let max = response.max[crate_name.replace("-opt", "")]; |
70 | 90 | for (let name of benchmark_names) {
|
71 | 91 | let data = response.benchmarks[crate_name][name];
|
72 | 92 | datasets.push({
|
|
101 | 121 | let date = new Date();
|
102 | 122 | date.setUTCMilliseconds(this.x);
|
103 | 123 | let commit = this.point.commit.substr(0, 10);
|
104 |
| - let yAxis = crate_name.startsWith("Summary") ? summaryYAxis : yAxis; |
| 124 | + let y_axis = crate_name.startsWith("Summary") ? summaryYAxis : yAxis; |
105 | 125 | return "<b>" + date.toLocaleString() + " - " + commit + "</b>" +
|
106 | 126 | "<br>" + this.series.name + ": " + this.point.absolute.toFixed(2) + " " +
|
107 |
| - yAxis.toLowerCase() + " (" + |
| 127 | + y_axis.toLowerCase() + " (" + |
108 | 128 | this.point.percent.toFixed(2) + "% from start)";
|
109 | 129 | },
|
110 | 130 | },
|
111 | 131 | xAxis: {
|
112 | 132 | type: "datetime",
|
113 | 133 | },
|
114 | 134 | yAxis: absolute ? {
|
115 |
| - title: { |
| 135 | + title: crate_name.includes("-opt") ? { text: "" } : { |
116 | 136 | text: crate_name.startsWith("Summary") ? summaryYAxis : yAxis,
|
117 | 137 | },
|
| 138 | + labels: crate_name.includes("-opt") ? { |
| 139 | + enabled: false, |
| 140 | + } : {}, |
118 | 141 | min: 0,
|
| 142 | + max: max * 1.05, |
| 143 | + softMax: max * 1.05, |
| 144 | + ceiling: max * 1.05, |
| 145 | + floor: 0, |
119 | 146 | } : {
|
120 |
| - softMax: 5, |
| 147 | + max: max * 1.05, |
121 | 148 | softMin: -5,
|
122 | 149 | minRange: 0.1,
|
123 | 150 | title: {
|
|
0 commit comments