Statistics

There is a range of statistic information available to help with monitoring performance. The stats feature is enabled by default. Each connected controller has its own set of stats.

Ping
The ping is calculated as a roundtrip of stats type message. These are send constantly between the computer and the smartphone and are not influenceed by message throttle or the user type messages.

var controller = simplePeer.controllerList[1]; // get a controller with player ID 1
controller.ping; //will return the current ping

User message rate
A list of times of last user type messages received in the last second.

controller.messageTimes; //will return list of Date variables

Statistic message rate
A list of times of last stats type messages received in the last second.

controller.messageTimesStats; //will return list of Date variables

There is a stats calculator available to test with up to 4 users. You can input a url to your own controller or use one of the provided ones to run performance tests. Connect the controllers then press start to run the simulation. The plots will be created after the simulation is stopped and a csv file will be available to download.