Skip to content

Latest commit

 

History

History

playground

sxg-rs/playground

A playground to locally preview Signed Exchanges without needing a certificate.

Build

  1. Compile sxg-rs to WebAssembly

    cd ../cloudflare_worker && wrangler build && cd ../playground
  2. Compile playground

    npm install
    npm run build

Run

node dist/index.js --single-url https://example.com/ --emulate-network Fast\ 3G --repeat-time 3

The output will be like below.

Measuring non-SXG LCP of https://example.com/
LCP 1 / 3: 720
LCP 2 / 3: 674
LCP 3 / 3: 636
Measuring SXG LCP of https://example.com/
LCP 1 / 3: 78
LCP 2 / 3: 95
LCP 3 / 3: 69
SXG changes LCP from 677 ± 24 to 80 ± 8