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

$\begingroup$

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 ~

$\endgroup$ 2

1 Answer

$\begingroup$

(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.

$\endgroup$ 0

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like