GeezerVison is showing github.com — Step 1: Make every report relative to the claimed one · fastruby/fast-ruby@b89e500
File treeExpand file treeCollapse file tree Open diff view settings Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: script/build_results_site.rb +8-4Lines changed: 8 additions & 4 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -172,25 +172,29 @@ def entry(report, name) | 172 | 172 | report["entries"].find { |e| e["name"] == name } | 173 | 173 | end | 174 | 174 |
| 175 | | - # Per report: [i/s, error, relative to the reference's median]. Relative is nil for a suspect or zero result, or a report the reference does not have. | | 175 | + # Per report: [i/s, error, relative to the reference's median of the claimed report]. | | 176 | + # Every report of a benchmark shares that one baseline, so on the chart the higher line is the faster report. | | 177 | + # Relative is nil for a suspect or zero result, or when the reference has no usable pass of the claimed report. | 176 | 178 | def cross_run(report, names, ref_ips) | 177 | 179 | entries = names.each_with_index.map do |name, i| | 178 | 180 | e = entry(report, name) or next nil | 179 | | - rel = ref_ips[i].empty? || !e["ips"].positive? || e["ips"] > SUSPECT_IPS ? nil : (e["ips"] / median(ref_ips[i])).round(4) | | 181 | + rel = ref_ips[0].empty? || !e["ips"].positive? || e["ips"] > SUSPECT_IPS ? nil : (e["ips"] / median(ref_ips[0])).round(4) | 180 | 182 | [e["ips"].round(3), e["error"].to_f.round(1), rel] | 181 | 183 | end | 182 | 184 | { entries: entries, pass: report["pass"] } | 183 | 185 | end | 184 | 186 |
| 185 | | - # The reference itself: its median pass, 1.0 relative to itself. | | 187 | + # The reference itself: its median pass, relative to its own claimed report (1.0 for the claimed report). | 186 | 188 | def reference_run(passes, names, ref_ips) | 187 | 189 | entries = names.each_with_index.map do |name, i| | 188 | 190 | es = passes.filter_map { |r| entry(r, name) } | 189 | 191 | next nil if es.empty? | 190 | 192 |
| 191 | 193 | usable = es.select { |e| e["ips"].positive? && e["ips"] <= SUSPECT_IPS } | 192 | 194 | pick = usable.empty? ? es : usable | 193 | | - [median(pick.map { |e| e["ips"] }).round(3), median(pick.map { |e| e["error"].to_f }).round(1), ref_ips[i].empty? ? nil : 1.0] | | 195 | + ips = median(pick.map { |e| e["ips"] }) | | 196 | + rel = ref_ips[0].empty? || ref_ips[i].empty? ? nil : (median(ref_ips[i]) / median(ref_ips[0])).round(4) | | 197 | + [ips.round(3), median(pick.map { |e| e["error"].to_f }).round(1), rel] | 194 | 198 | end | 195 | 199 | { entries: entries, passes: passes.map { |r| r["pass"] }.sort } | 196 | 200 | end | |
Collapse file Copy file name to clipboardExpand all lines: script/results_site.html +6-3Lines changed: 6 additions & 3 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -609,7 +609,7 @@ <h2 class="bh">FastRuby<span>.io</span> keeps fast-ruby running</h2> | 609 | 609 | })(); | 610 | 610 | </script> | 611 | 611 | <script> | 612 | | -// Across Rubies. Each entry is [i/s, error, relative to the reference's median]. | | 612 | +// Across Rubies. Each entry is [i/s, error, relative to the reference's median of the claimed report]. | 613 | 613 | (function () { | 614 | 614 | const $ = (id) => document.getElementById(id); | 615 | 615 | const D = window.ACROSS_RUBIES; | @@ -634,7 +634,7 @@ <h2 class="bh">FastRuby<span>.io</span> keeps fast-ruby running</h2> | 634 | 634 | const sus = (e) => !!e && e[0] > M.suspect; | 635 | 635 | // A result that can be drawn and compared: it ran and is not suspect. | 636 | 636 | const ok = (e) => !!e && !sus(e) && e[0] > 0; | 637 | | - // Relative needs the reference to have that report. | | 637 | + // Relative needs the reference to have the claimed report. | 638 | 638 | const val = (e) => ok(e) ? (showing === "rel" ? e[2] : e[0]) : null; | 639 | 639 | // Two reports of one build, measured seconds apart: same-ish when the error bars overlap, as benchmark-ips says. | 640 | 640 | const same = (a, b) => a[0] + a[1] > b[0] - b[1] && a[0] - a[1] < b[0] + b[1]; | @@ -824,7 +824,10 @@ <h2 class="bh">FastRuby<span>.io</span> keeps fast-ruby running</h2> | 824 | 824 | if (mode && !has(mode)) mode = ""; | 825 | 825 | $("rmodes").innerHTML = MODES.map(([m, name]) => `<button type="button" class="chip" data-m="${m}" aria-pressed="${m === mode}" ${has(m) ? "" : 'disabled title="Not built in this run"'}>${name}</button>`).join(""); | 826 | 826 | $("rshow").innerHTML = SHOWS.map(([k, name]) => `<button type="button" class="chip" data-s="${k}" aria-pressed="${k === showing}">${esc(name)}</button>`).join(""); | 827 | | - $("rhint").textContent = mode ? "Dashed: the same Rubies without the JIT, on the same machine." : ""; | | 827 | + const hints = []; | | 828 | + if (showing === "rel") hints.push(`1× is the claimed idiom on ${nice(REF)}.`); | | 829 | + if (mode) hints.push("Dashed: the same Rubies without the JIT, on the same machine."); | | 830 | + $("rhint").textContent = hints.join(" "); | 828 | 831 | let h = "", sec = null; | 829 | 832 | B.forEach((b, n) => { | 830 | 833 | if (b.section !== sec) { sec = b.section; h += `<h2>${esc(sec)}<span class="on">${esc(MODES.find(([m]) => m === mode)[1])}</span></h2>`; } | |
|