GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Step 1: Make every report relative to the claimed one · fastruby/fast-ruby@b89e500

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • script
    • build_results_site.rb
    • results_site.html
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎script/build_results_site.rb‎

Copy file name to clipboardExpand all lines: script/build_results_site.rb
+8-4Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -172,25 +172,29 @@ def entry(report, name)
172172
report["entries"].find { |e| e["name"] == name }
173173
end
174174

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.
176178
def cross_run(report, names, ref_ips)
177179
entries = names.each_with_index.map do |name, i|
178180
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)
180182
[e["ips"].round(3), e["error"].to_f.round(1), rel]
181183
end
182184
{ entries: entries, pass: report["pass"] }
183185
end
184186

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).
186188
def reference_run(passes, names, ref_ips)
187189
entries = names.each_with_index.map do |name, i|
188190
es = passes.filter_map { |r| entry(r, name) }
189191
next nil if es.empty?
190192

191193
usable = es.select { |e| e["ips"].positive? && e["ips"] <= SUSPECT_IPS }
192194
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]
194198
end
195199
{ entries: entries, passes: passes.map { |r| r["pass"] }.sort }
196200
end
Collapse file

‎script/results_site.html‎

Copy file name to clipboardExpand all lines: script/results_site.html
+6-3Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -609,7 +609,7 @@ <h2 class="bh">FastRuby<span>.io</span> keeps fast-ruby running</h2>
609609
})();
610610
</script>
611611
<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].
613613
(function () {
614614
const $ = (id) => document.getElementById(id);
615615
const D = window.ACROSS_RUBIES;
@@ -634,7 +634,7 @@ <h2 class="bh">FastRuby<span>.io</span> keeps fast-ruby running</h2>
634634
const sus = (e) => !!e && e[0] > M.suspect;
635635
// A result that can be drawn and compared: it ran and is not suspect.
636636
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.
638638
const val = (e) => ok(e) ? (showing === "rel" ? e[2] : e[0]) : null;
639639
// Two reports of one build, measured seconds apart: same-ish when the error bars overlap, as benchmark-ips says.
640640
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>
824824
if (mode && !has(mode)) mode = "";
825825
$("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("");
826826
$("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(" ");
828831
let h = "", sec = null;
829832
B.forEach((b, n) => {
830833
if (b.section !== sec) { sec = b.section; h += `<h2>${esc(sec)}<span class="on">${esc(MODES.find(([m]) => m === mode)[1])}</span></h2>`; }

0 commit comments

Comments
0 (0)
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.