Regarding WebSocket support addition to DevTools project Idea

132 views
Skip to first unread message

Divyansh Singh

unread,
Feb 20, 2026, 2:27:22 AMFeb 20
to dart-gsoc
Hello,

I was working on the sample project ProfileableWebSocket and I have to decide which approach to this would be the best. I would also like to disclose that some approaches were suggested by an LLM.

1. I looked at the HttpProfile code which used a decorator pattern, similarly here the class would be an implementation of WebSocket where I would only care about the methods needed like add() and listen() and record a "SocketEvent". This approach is pretty verbose.

2. [LLM suggested] Using StreamView, which will automatically handle all the other methods without us having to override them ourselves.

3. [LLM suggested] Using a StreamController, recording the events and pushing data into our own controller for the user to listen.

Would love to know what are the tradeoffs here and help me decide on the approach to take, Thanks!

Elliott Brooks

unread,
Feb 23, 2026, 6:04:30 PMFeb 23
to dart-gsoc

Thank you for reaching out! I'm replying to the public group as well so this is information is findable by other applicants.


Part of the goal of the starter project is to evaluate applicants' design decisions, so unfortunately I can't tell you which of the approaches you've outlined is the right one. But here's a hint: as you consider the differences and trade-offs between them, keep in mind that a key characteristic of Dart's WebSocket is that it implements both Stream and StreamSink


Hope this helps!

Elliott

Message has been deleted

Divyansh Shah

unread,
Mar 19, 2026, 8:16:46 PM (11 days ago) Mar 19
to dart-gsoc
Hey Elliott,
 built a working prototype based on your hint  and with a discussion with samuel.
It captures WebSocket frame-level events, performs request-response pairing, tracks latency, and emits structured JSON events similar to how DevTools consumes VM Service data.
Here’s the prototype:
https://github.com/crackedhandle/devtools-websocket-profiler
I’d really appreciate your feedback on the event model and how this could map into the DevTools Network panel. Please suggest me the feedback so that we can solve the issue and learn something great.
Thank you for your time.

Reply all
Reply to author
Forward
0 new messages