Skip to content

Commit c1e6eda

Browse files
committed
doc: add resource timing attribute entries
Document the five getters PerformanceResourceTiming gained: finalResponseHeadersStart, firstInterimResponseStart, renderBlockingStatus, contentType and contentEncoding, add the missing responseStart entry, and record its new interim-aware behavior. Signed-off-by: greenhead <greenheadhq@gmail.com>
1 parent 5155a07 commit c1e6eda

1 file changed

Lines changed: 86 additions & 0 deletions

File tree

‎doc/api/perf_hooks.md‎

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1091,6 +1091,55 @@ changes:
10911091
The high resolution millisecond timestamp representing the time immediately
10921092
before Node.js receives the first byte of the response from the server.
10931093

1094+
### `performanceResourceTiming.finalResponseHeadersStart`
1095+
1096+
<!-- YAML
1097+
added: REPLACEME
1098+
-->
1099+
1100+
* Type: {number}
1101+
1102+
The high resolution millisecond timestamp representing the time immediately
1103+
after Node.js receives the first byte of the headers of the final response,
1104+
as opposed to an interim response.
1105+
1106+
### `performanceResourceTiming.firstInterimResponseStart`
1107+
1108+
<!-- YAML
1109+
added: REPLACEME
1110+
-->
1111+
1112+
* Type: {number}
1113+
1114+
The high resolution millisecond timestamp representing the time immediately
1115+
after Node.js receives the first byte of the first interim response, such as
1116+
a `103 Early Hints` response. Node.js does not currently record interim
1117+
responses, so the property always returns 0.
1118+
1119+
### `performanceResourceTiming.responseStart`
1120+
1121+
<!-- YAML
1122+
added:
1123+
- v18.2.0
1124+
- v16.17.0
1125+
changes:
1126+
- version: REPLACEME
1127+
pr-url: https://github.com/nodejs/node/pull/65017
1128+
description: This property now returns `firstInterimResponseStart`
1129+
when it is non-zero.
1130+
- version: v19.0.0
1131+
pr-url: https://github.com/nodejs/node/pull/44483
1132+
description: This property getter must be called with the
1133+
`PerformanceResourceTiming` object as the receiver.
1134+
-->
1135+
1136+
* Type: {number}
1137+
1138+
The high resolution millisecond timestamp representing the time immediately
1139+
after Node.js receives the first byte of the response from the server. This
1140+
is `firstInterimResponseStart` when it is non-zero, and
1141+
`finalResponseHeadersStart` otherwise.
1142+
10941143
### `performanceResourceTiming.responseEnd`
10951144

10961145
<!-- YAML
@@ -1166,6 +1215,43 @@ A number representing the size (in octets) received from the fetch
11661215
(HTTP or cache), of the message body, after removing any applied
11671216
content-codings.
11681217

1218+
### `performanceResourceTiming.renderBlockingStatus`
1219+
1220+
<!-- YAML
1221+
added: REPLACEME
1222+
-->
1223+
1224+
* Type: {string}
1225+
1226+
The render blocking status of the resource. It is either `'blocking'` or
1227+
`'non-blocking'`. Resources fetched by Node.js are never render blocking, so
1228+
the property always returns `'non-blocking'`.
1229+
1230+
### `performanceResourceTiming.contentType`
1231+
1232+
<!-- YAML
1233+
added: REPLACEME
1234+
-->
1235+
1236+
* Type: {string}
1237+
1238+
The minimized MIME type of the content of the fetched resource, or an empty
1239+
string if it cannot be determined. Node.js does not currently populate this
1240+
field, so the property returns an empty string.
1241+
1242+
### `performanceResourceTiming.contentEncoding`
1243+
1244+
<!-- YAML
1245+
added: REPLACEME
1246+
-->
1247+
1248+
* Type: {string}
1249+
1250+
The content encoding, such as `'gzip'` or `'br'`, that was applied to the
1251+
fetched resource, or an empty string if none was applied or it cannot be
1252+
determined. Node.js does not currently populate this field, so the property
1253+
returns an empty string.
1254+
11691255
### `performanceResourceTiming.toJSON()`
11701256

11711257
<!-- YAML

0 commit comments

Comments
 (0)