I was having serious lag issues with
a secret game I'm working on, so I wrote this Repl to measure ping and verify my Internet connection wasn't the problem.
For an equal comparison, Node.js and socket.io is used.
- Samples average ping
- Determines "FPS"
- Update: Adjusts graph size to fit data
SortaGrapher is used to plot the average ping on a
- "Ping-pong" based: the client pings the server and waits for a response.
- Data size can be changed via a slider to reflect real performance - a random string is sent with varying length.
Because TCP is used to send packets, any data that is "missed" will be retransmitted, thus creating average pings below 16ms (1000/60, 60 pps).