How to find the number of x per second given the time elapsed?

6.2k Views Asked by At

I'm benchmarking a websocket server and I am very poor at math so please forgive me.

I am recording the amount of messages sent, and the elapsed time:

Players Connected: 2. Messages Sent: 3528, Elapsed Time: 180.7 seconds

I am wondering if it's possible to get the amount of messages (i) that are being sent per second? I'm not really looking for code, but just on the algorithm needed. I have tried Elapsed Time * i / 60 but with no luck. Thanks ~

1

There are 1 best solutions below

0
On BEST ANSWER

(Number of messages)/(elapsed time) = (number of message per elapsed time unit)

This is the equation you want, because elapsed time is already in seconds no further corrections are needed.