Skip to content

Conversation

@guybedford
Copy link
Collaborator

This adds a benchmark to the repo as a self-contained app which sends 10 sub-requests back to the same worker with a payload of 1MB each.

This was a complete one-shot from Claude, and after thorough testing against various cases seems to work very well.

"bench": "npm run build && node run.js"
},
"dependencies": {
"miniflare": "^4.20250923.0"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it seems this is extremely old isn't it? can you also enable dependably on this path?

"private": true,
"scripts": {
"build": "WASM_BINDGEN_BIN=../wasm-bindgen/target/debug/wasm-bindgen ../target/debug/worker-build --release",
"bench": "npm run build && node run.js"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"bench": "npm run build && node run.js"
"bench": "node --run build && node run.js"

}

// Execute all tasks in parallel
let start = Date::now().as_millis();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this seems to be a not good path. can we use rdtsc?

},
"scripts": {
"build": "cd wasm-bindgen && cargo build -p wasm-bindgen-cli --bin wasm-bindgen && cd .. && cargo build -p worker-build",
"bench": "cd benchmark && npm run build && npm run bench",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"bench": "cd benchmark && npm run build && npm run bench",
"bench": "cd benchmark && node --run build && node --run bench",

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants