SoftwareGuy / Ignorance

Ignorance utilizes the power of ENet to provide a reliable UDP networking transport for Mirror Networking.
Other
248 stars 31 forks source link

Feature: Server statistics #81

Closed David548219 closed 2 years ago

David548219 commented 2 years ago

This pr adds server statistics:

Peer statistics include:

This is a module that I made for use in my project to track player rtt from server (Ignorance 1.4.0b6.1), I selected v1.4.0b7-connevents-in-incoming as base because it is the closest branch to the version I made it for. When implementing I tried to replicate workflow for client stats. IgnoranceServerStats are recycled, dictionaries are initialized with max peer amount capacity.

SoftwareGuy commented 2 years ago

I'll review it. Sounds like a good feature.

I'll port it to the master branch since that connevents-in-incoming is actually experimental and wasn't merged into master as it potentially could cause some out-of-sync issues after talking about it with another few developers.

SoftwareGuy commented 2 years ago

Forward-ported in latest master commits. Also fixed the client statistics not working correctly; dumb moment.