mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-02-15 03:30:53 +01:00
Don't run Prometheus metrics on the client.
This commit is contained in:
@@ -393,7 +393,8 @@ namespace Robust.Server
|
||||
_mainLoop = new GameLoop(_time)
|
||||
{
|
||||
SleepMode = SleepMode.Delay,
|
||||
DetectSoftLock = true
|
||||
DetectSoftLock = true,
|
||||
EnableMetrics = true
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -87,6 +87,8 @@ namespace Robust.Shared.Timing
|
||||
/// </summary>
|
||||
public bool DetectSoftLock { get; set; }
|
||||
|
||||
public bool EnableMetrics { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// The method currently being used to limit the Update rate.
|
||||
/// </summary>
|
||||
@@ -186,7 +188,14 @@ namespace Robust.Shared.Timing
|
||||
try
|
||||
{
|
||||
#endif
|
||||
using (_frameTimeHistogram.NewTimer())
|
||||
if (EnableMetrics)
|
||||
{
|
||||
using (_frameTimeHistogram.NewTimer())
|
||||
{
|
||||
Tick?.Invoke(this, simFrameEvent);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Tick?.Invoke(this, simFrameEvent);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user