You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* feat: add server timing to responses
* chore: remove unique id on stream-and-chunk
* fix: more timings and add timing header before err
* fix: serverTiming is easy to add to functions
* test: add server timing tests
* fix: serverTiming duration testing is robust across platforms
* fix: server timing headers are not included by default
* docs: explain server timing header capabilities
* docs: fix server timing docs and generate new readme
* chore: pr suggestion
Co-authored-by: Daniel Norman <1992255+2color@users.noreply.github.com>
* feat: ipns+dnslink server timing, renames & refactoring
* chore: remove unnecessary null coalescing operator
---------
Co-authored-by: Daniel Norman <1992255+2color@users.noreply.github.com>
By default, we do not include [Server Timing](https://developer.mozilla.org/en-US/docs/Web/API/Performance_API/Server_timing) headers in responses. If you want to include them, you can pass an
641
+
`withServerTiming` option to the `createVerifiedFetch` function to include them in all future responses. You can
642
+
also pass the `withServerTiming` option to each fetch call to include them only for that specific response.
643
+
644
+
See PR where this was added, <https://github.com/ipfs/helia-verified-fetch/pull/164>, for more information.
645
+
638
646
### Possible Scenarios that could cause confusion
639
647
640
648
#### Attempting to fetch the CID for content that does not make sense
* By default, we do not include [Server Timing](https://developer.mozilla.org/en-US/docs/Web/API/Performance_API/Server_timing) headers in responses. If you want to include them, you can pass an
610
+
* `withServerTiming` option to the `createVerifiedFetch` function to include them in all future responses. You can
611
+
* also pass the `withServerTiming` option to each fetch call to include them only for that specific response.
612
+
*
613
+
* See PR where this was added, https://github.com/ipfs/helia-verified-fetch/pull/164, for more information.
614
+
*
607
615
* ### Possible Scenarios that could cause confusion
608
616
*
609
617
* #### Attempting to fetch the CID for content that does not make sense
@@ -145,14 +150,15 @@ function dnsLinkLabelDecoder (linkLabel: string): string {
145
150
* @todo we need to break out each step of this function (cid parsing, ipns resolving, dnslink resolving) into separate functions and then remove the eslint-disable comment
constresolveResultWithServerTiming=awaitserverTiming('ipns.resolve',`Resolve IPNS name ${cidOrPeerIdOrDnsLink}`,ipns.resolve.bind(null,peerId.publicKey,options))
0 commit comments