Skip to content

Latest commit

 

History

History
78 lines (55 loc) · 1.7 KB

README.md

File metadata and controls

78 lines (55 loc) · 1.7 KB

Wasm Workers Server Benchmarks

Results (2,3 GHz Quad-Core Intel Core i7)

Framework Med (ms) Min (ms) Max (ms)
Fastify 8.48 6.31 77.24
Express 10.62 6.77 212.23
Cloudflare Workers 12.28 7.8 121.97
WWS (with Hono) 503.87 272.96 1010

Setup

Install WWS

curl -fsSL https://workers.wasmlabs.dev/install | bash
wws --help

Install k6

brew install k6

Extras

Create your K6 Grafana Cloud here.

Login to k6

k6 login cloud --token <YOUR_TOKEN>

Create a k6 load test

# under the specific directory (eg. ssr) do this
k6 new
# this command will create a new default `script.js` file

# or you can create your own as follows:

Update the test file content like the following:

export const options = {
  ext: {
    loadimpact: {
      projectID: <YOUR_PROJECT_ID>,
      // Test runs with the same name groups test runs together
      name: 'Default'
    }
  }
}

Run the k6 load test on Grafana Cloud

cd ./js/ssr
k6 cloud loadTest.js

Increase vus (Parallel virtual users) with another run:

k6 cloud --vus 10 --duration 30s loadTest.js

Resources