cloudflare / cloudflare/workerd
🐛 Bug Report — Strange "throw" accounting in chrome dev tools
- Dominant language
- C++
- Stars
- 8.7k
- Forks
- 739
- Avg merge
- 2d 20h
- Merged PRs (30d)
- 174
Description
I see some strange behaviour with "throw" lines being potentially miscounted in performance profiles. Latest workerd (reports as `workerd 2025-10-11`), on macOS.
These images are from a single request that took about 50ms (while the inspector was attached) – note the figures here are 1.5 and 4.5 secs, which is impossible – so something is either double counting, or not representing time take correctly.
Essentially identical code running in Node.js – it accounts for the throw time correctly:
Code is:
```js
export default {
async fetch() {
for (let i = 0; i < 10_000; i++) {
try {
throwChunk();
} catch {}
}
return new Response();
},
};
function throwChunk() {
throw new Error();
}
```
Running with `workerd` directly, not wrangler/miniflare.
Contributor guide
Assessment
This issue has not been assessed yet.