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 2013d53
Browse filesBrowse the repository at this point in the historyBrowse files
Step 6: Explain the results site and the two workflows
CONTRIBUTING: how to run a few benchmarks on a few builds and build the
site from them, which builds to leave out on an Apple silicon Mac, and
what each workflow does.
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