nodejs / undici

An HTTP/1.1 client, written from scratch for Node.js
https://nodejs.github.io/undici
MIT License
6.16k stars 532 forks source link

mark resource timing #952

Closed ronag closed 2 years ago

ronag commented 3 years ago

Does node have something similar to https://w3c.github.io/resource-timing/#dfn-mark-resource-timing which would make sense to report fetch info to?

https://github.com/nodejs/undici/blob/3d2dbc72470af39c887bec8a7a432cee6f35a150/lib/fetch/index.js#L207-L213

@nodejs/diagnostics @addaleax @jasnell

Qard commented 3 years ago

This would connect to perf_hooks but will need some additions. We have PerformanceEntry but no PerformanceResourceTiming yet. I don't think it would be difficult to add though. 🤔

jasnell commented 3 years ago

It's certainly doable. We'll need to expose a public API for publishing custom performance entries. Not unreasonable at all.

RafaelGSS commented 3 years ago

I have been working in a sketch https://github.com/RafaelGSS/node/pull/1

jasnell commented 3 years ago

I should be able to carve out some time next week to see what we need in node.js to make this a bit more feasible.

RafaelGSS commented 2 years ago

FYI I'm working on that in Node.js core. Planning a PR in Node.js in the next coming days.

RafaelGSS commented 2 years ago

FYI: PerformanceResourceTiming was just merged into master and it will be released next Tuesday on v18.2.

RafaelGSS commented 2 years ago

@Trott I think this issue doesn't need to be closed because undici.fetch doesn't use it yet.

Trott commented 2 years ago

@Trott I think this issue doesn't need to be closed because undici.fetch doesn't use it yet.

I didn't manually close it. It got closed because of the "Fixes:" line in the commit message. Feel free to re-open or whatever you want to do with it. I have no opinion at all.

qm3ster commented 3 weeks ago

RIP https://github.com/oven-sh/bun/issues/8867