You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 06c3bc9
Browse filesBrowse the repository at this point in the historyBrowse files
# Builds and publishes the results site (https://fastruby.github.io/fast-ruby/).
4
+
# Every Ruby runs each benchmark on the same machine, so the site can compare i/s across Rubies; benchmarks.yml runs each Ruby on its own machine and only checks that the benchmarks run.
5
+
# Weekly, because a full run takes about 3 hours per shard; run it by hand to publish sooner.
6
+
on:
7
+
schedule:
8
+
# Sunday 03:00 UTC, away from the working day's PR runs.
9
+
- cron: '0 3 * * 0'
10
+
workflow_dispatch:
11
+
12
+
jobs:
13
+
# 6 machines, each running every 6th benchmark file on all 26 builds, with the newest released Ruby run again between them (script/run_cross_ruby.rb).
14
+
shard:
15
+
name: shard ${{ matrix.shard }}
16
+
runs-on: ubuntu-latest
17
+
# 35 passes of about 13 files each; the job limit is 6 hours.
RUBY_VARIANT=zjit RUBY_VARIANT_FLAGS=--zjit docker compose run --rm ruby_4.0 code/your-new/entry.rb
105
106
```
106
107
107
-
To keep the results, set `RESULTS_DIR`. Each benchmark then also writes its
108
-
report as JSON to `results/<label>/`, with the Ruby, its flags and the machine
109
-
it ran on:
108
+
## The results site
109
+
110
+
The results site (https://fastruby.github.io/fast-ruby/) compares Rubies, so every build of a benchmark has to run on the same machine.
111
+
`script/run_cross_ruby.rb` (Ruby 3 on your machine, it calls Docker) does that, and runs the newest released MRI again after every 3 builds, so the site can show how steady the machine was.
112
+
To see a few benchmarks the way the site shows them, run them on a few builds, build the site into `_site/`, then open `_site/index.html` in a browser:
110
113
111
114
```
112
-
RESULTS_DIR=results RESULTS_LABEL=ruby_3.4 docker compose run --rm ruby_3.4 code/your-new/entry.rb
To see those results the way the results site shows them, build the site
116
-
into `_site/`, then open `_site/index.html` in a browser:
119
+
`ruby script/run_cross_ruby.rb --help` lists the options.
120
+
The builds are the ones in the CI matrix (`.github/workflows/benchmarks.yml`), so a new Ruby added there and in `compose.yaml` is measured too, and once released it becomes both the reference and the Ruby the site opens on.
121
+
On an Apple silicon Mac, leave out `ruby_2.1` and `jruby_9.1` (they run under emulation, so their numbers are not comparable) and `ruby_3.1+yjit` (Ruby 3.1's YJIT only exists on x86-64).
CI does the same after every run: the site is attached to the run as the
123
-
`site-preview` artifact, and published to GitHub Pages from `main`.
125
+
-`.github/workflows/benchmarks.yml` checks that every benchmark runs on every Ruby: on a PR, the benchmark files it changes; on `main`, all of them when a benchmark or a shared file changed. It publishes nothing.
126
+
-`.github/workflows/results-site.yml` runs every build on every file once a week, split over 6 machines, and publishes the site. Run it by hand from the Actions tab to publish sooner.
0 commit comments