Skip to content

feat: support detailed server timings#335

Merged
achingbrain merged 2 commits into
mainfrom
feat/report-detailed-server-timings
Apr 9, 2026
Merged

feat: support detailed server timings#335
achingbrain merged 2 commits into
mainfrom
feat/report-detailed-server-timings

Conversation

@achingbrain

Copy link
Copy Markdown
Member

When the withServerTimings option is true, report detailed timings - e.g. how long to find providers, how long to connect to them, to download blocks, etc.

Change checklist

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation if necessary (this includes comments as well)
  • I have added tests that prove my fix is effective or that my feature works

When the `withServerTimings` option is `true`, report detailed
timings - e.g. how long to find providers, how long to connect to
them, to download blocks, etc.
@achingbrain

achingbrain commented Apr 2, 2026

Copy link
Copy Markdown
Member Author

@achingbrain

Copy link
Copy Markdown
Member Author

@achingbrain achingbrain marked this pull request as ready for review April 9, 2026 09:09
@achingbrain achingbrain requested a review from a team as a code owner April 9, 2026 09:09
@achingbrain achingbrain merged commit 87315a5 into main Apr 9, 2026
20 checks passed
@achingbrain achingbrain deleted the feat/report-detailed-server-timings branch April 9, 2026 09:10
github-actions Bot pushed a commit that referenced this pull request Apr 9, 2026
@github-actions

github-actions Bot commented Apr 9, 2026

Copy link
Copy Markdown

🎉 This PR is included in version @helia/verified-fetch-v7.2.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

github-actions Bot pushed a commit that referenced this pull request Apr 9, 2026
@github-actions

github-actions Bot commented Apr 9, 2026

Copy link
Copy Markdown

🎉 This PR is included in version @helia/verified-fetch-interop-v4.2.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@dennis-tra

Copy link
Copy Markdown

Thanks @achingbrain, it should automatically appear in our database. I'll monitor the data

@achingbrain

Copy link
Copy Markdown
Member Author

No problem - it'll need a service worker gateway release before the headers start to appear. This should happen later today.

@achingbrain

Copy link
Copy Markdown
Member Author

This has been deployed on inbrowser.link now so please give it a go.

N.b. the server timing values are heavily abbreviated to reduce the header size, everything should be documented in the readme but let me know if anything doesn't make sense.

@dennis-tra

dennis-tra commented Apr 9, 2026

Copy link
Copy Markdown

Nice, the data is there! Here's one random probe

{"b":0.013,"c":1.255,"f":1.2770000000000001,"i":"0","p":0.001}

Edit: Ah I see that e.g., p can appear multiple times. If I'm not mistaken I'm filling a map and thus overwrite earlier values. Need to double check

@achingbrain

achingbrain commented Apr 9, 2026

Copy link
Copy Markdown
Member Author

Please check the tables in the README.

p is a provider, and you can find multiple providers for a given block so yes, it can appear multiple times.

If you inspect the desc field of the timing tuple, it will tell you the first 10 chars of the PeerID of the provider, and the routing system that found it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants