DenoDDeno
Powered by
NicolasN
Denoβ€’16mo agoβ€’
7 replies
Nicolas

Concurrent fetch timing

Hey all :playful_deno:

I'm trying to find a way of accurately timing a few fetch calls that are triggered concurrently. I tried something basic, but each new request will have an increased time, probably due to the internal fetch pool having some delay to send new requests:

functionCalledConcurrentlyManyTimes() {
  // start timer
  fetch(url).then((response) => {
    // end timer
  }
}
functionCalledConcurrentlyManyTimes() {
  // start timer
  fetch(url).then((response) => {
    // end timer
  }
}


I read all pages of doc and GitHub issues I could find on the subject, the node:perf_hooks API does not seem to implement resource watching, and I'm out of idea to make that work πŸ€”

Any help is appreciated! Cheers.
Deno banner
DenoJoin
Chat about Deno, a modern runtime for JavaScript and TypeScript.
20,934Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Get HTTP timings with deno fetch api
theflamingskunkTtheflamingskunk / help
2y ago
concurrent deno tasks
wesbosWwesbos / help
2y ago