-
Notifications
You must be signed in to change notification settings - Fork 357
add benchmark suite #867
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
add benchmark suite #867
Conversation
| "bench": "npm run build && node run.js" | ||
| }, | ||
| "dependencies": { | ||
| "miniflare": "^4.20250923.0" |
There was a problem hiding this comment.
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" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| "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(); |
There was a problem hiding this comment.
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", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| "bench": "cd benchmark && npm run build && npm run bench", | |
| "bench": "cd benchmark && node --run build && node --run bench", |
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.