Files
sbox-public/game/addons/menu/Code/DevUI/Stats/HostStats.razor

21 lines
567 B
Plaintext

@namespace Sandbox.UI.Dev.Stats
@inherits Panel
<root class="statbox">
@{
var hostStats = Networking.HostStats;
}
<title>Host Stats</title>
<StatValue Value="@hostStats.Fps.ToString()" Title="FPS"></StatValue>
<StatValue Value="@( (hostStats.InBytesPerSecond / 1024f).ToString( "0.00" ) )" Title="KB In Per Second"></StatValue>
<StatValue Value="@( (hostStats.OutBytesPerSecond / 1024f).ToString( "0.00" ) )" Title="KB Out Per Second"></StatValue>
</root>
@code
{
protected override int BuildHash() => HashCode.Combine( DateTime.UtcNow.Second );
}