arl / statsviz

🚀 Visualise your Go program runtime metrics in real time in the browser
MIT License
3.19k stars 121 forks source link

feat: support sse transfer mode #122

Open mzzsfy opened 8 months ago

mzzsfy commented 8 months ago

support https://github.com/arl/statsviz/issues/117

mzzsfy commented 8 months ago

Don't allow this PR, I will update this PR when the other 2 PR are passed, and add some tests

mzzsfy commented 8 months ago

When this function is stable, it should be possible to remove websocket dependencies.

arl commented 8 months ago

We should switch to SSE and not keep an option websockets/SSE. Has no use for the user

mzzsfy commented 8 months ago

We should switch to SSE and not keep an option websockets/SSE. Has no use for the user

You are righ, I will have further updates after you merge other PR

mzzsfy commented 8 months ago

I submitted new code without using cache and solved all problems #119 #117

mzzsfy commented 8 months ago

I've noticed no movement for a week. Is there something wrong with this pr?

arl commented 8 months ago

I've noticed no movement for a week. Is there something wrong with this pr?

Hi. just haven't got the time yet

mzzsfy commented 8 months ago

Okay, continue to wait for your news. Now I am using replace to run the code. After you merge it, I can officially switch over.

mzzsfy commented 7 months ago

This pull request does more than what is advertised. In particular, it also handles multiples clients at once, which is an entire topic entirely (#119). Please keep the changes to the bare minimum, which is to switch from websocket to sse

Now that's 2 different pr's.

mzzsfy commented 6 months ago

It has been a month, have you encountered any difficulties?

mzzsfy commented 6 months ago

create a new method Metrics() and mark Ws() as deprecated,add method MetricsPath() for custom paths,Compatibility has been ensured as much as possible
updated all examples