This repository contains a series of benchmarks to test islands architecture.
To run the edge server locally, do the following:
nvm useto use the right version of Nodenpm installto install dependenciesnpx playwright installto install Playwright browsersnpm startto run the server
After that you should be able to access localhost:3000 and the paths behind it. See the directory /functions to understand which endpoints are available.
TypeScript is used for the edge code (CloudFlare workers) and the setup has been derived from wrangler init.
To generate Lighthouse results, run the following:
npm run lighthouse:<test type>
You can see the summaries in the output (FCP in ms) as a CSV to copy to main.tex.
To make sure you have the latest browsers installed for testing, use npx playwright install.
Use the following commands to create KV stores at Cloudflare:
wrangler kv:namespace create COMMENTS
wrangler kv:namespace create COMMENTS --preview
To make sure your Pages instance find them, see these instructions on how to bind them.
Autocannon (req/s) tests are behind autocannon: namespace. Example.
npm run autocannon:edge
npm run autocannon:edge-with-isr
npm run autocannon:ssg
To run the whole suite that emits a CSV suitable for main.tex, use npm run autocannon and copy the output.
To get easy to use prints for LaTeX box plots, run any of the print: prefixed npm commands. Note that you need a recent version of Deno to run those scripts.