From 9b449187f6478fa2c1e10ee1227e9dcf6bc2e90e Mon Sep 17 00:00:00 2001 From: Randy Stauner Date: Wed, 8 May 2024 12:40:35 -0700 Subject: [PATCH] Document generating the site and serving it in the README --- README.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/README.md b/README.md index 27eb4e9e0..e38ed1cc7 100644 --- a/README.md +++ b/README.md @@ -27,6 +27,8 @@ For that reason, where we-the-authors provide official numbers they will usually ## How to Use this Repo +### Benchmark data + You can run `./basic_benchmark.rb` to clone appropriate other repositories (yjit, yjit-bench) and run the benchmarks. You can also specify one or more benchmark names on the command line to run only those benchmarks: `./basic_benchmark.rb activerecord` `basic_benchmark.rb` also accepts many other parameters, such as a `--skip-git-updates` parameter for runs after the first to not "git pull" its repos and rebuild Ruby. @@ -39,6 +41,24 @@ Use `basic_report.rb --help` to get started. There are several different reports You can find older examples of data-gathering scripts using `git log -- runners` (to see files that used to be in the "runners" directory) and post-processing scripts in the "formatters" directory. + +### speed.yjit.org site + +After collecting some data with `basic_benchmark.rb` you can generate the html +site (hosted at speed.yjit.org) with a simple command: + +`site/exe serve` + +This will move files from `./data/` into a `build` directory, +generate all the html files, and start a web server where you can view the site at `localhost:8000`. + +Some of the reports are built using `lib/yjit-metrics` and have templates in +`lib/yjit-metrics/report_templates`. +The rest of the files that build the site are found beneath `site`. +There are `erb` files to generate additional pages +and the script that does all the file rendering in `site/_framework/`. + + ## TruffleRuby Our experience has been that the JVM (non-default) version gets better results than the native/SubstrateVM version, so if you are going to install a release we recommend the truffleruby+graalvm variant (with ruby-build) or truffleruby-graalvm (with ruby-install).