Fixed a typo using e instead of a :(
This commit is contained in:
@@ -2771,8 +2771,8 @@ namespace Barotrauma
|
|||||||
|
|
||||||
commands.Add(new Command("ShowServerPerf", "Immediately log server performance info in ServerMessage", (string[] args) =>
|
commands.Add(new Command("ShowServerPerf", "Immediately log server performance info in ServerMessage", (string[] args) =>
|
||||||
{
|
{
|
||||||
GameServer.Log(PerformenceMonitor.PM.ToString(), ServerLog.MessageType.ServerMessage);
|
GameServer.Log(PerformanceMonitor.PM.ToString(), ServerLog.MessageType.ServerMessage);
|
||||||
NewMessage(PerformenceMonitor.PM.ToString(), Color.Green);
|
NewMessage(PerformanceMonitor.PM.ToString(), Color.Green);
|
||||||
}));
|
}));
|
||||||
|
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
|
|||||||
@@ -330,7 +330,7 @@ namespace Barotrauma
|
|||||||
Stopwatch performanceCounterTimer = Stopwatch.StartNew();
|
Stopwatch performanceCounterTimer = Stopwatch.StartNew();
|
||||||
stopwatch = Stopwatch.StartNew();
|
stopwatch = Stopwatch.StartNew();
|
||||||
|
|
||||||
PerformenceMonitor PM = new PerformenceMonitor();
|
PerformanceMonitor PM = new PerformanceMonitor();
|
||||||
|
|
||||||
long prevTicks = stopwatch.ElapsedTicks;
|
long prevTicks = stopwatch.ElapsedTicks;
|
||||||
while (ShouldRun)
|
while (ShouldRun)
|
||||||
@@ -426,7 +426,7 @@ namespace Barotrauma
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
PerformenceMonitor.PM.Dispose();
|
PerformanceMonitor.PM.Dispose();
|
||||||
|
|
||||||
stopwatch.Stop();
|
stopwatch.Stop();
|
||||||
|
|
||||||
|
|||||||
@@ -11,9 +11,9 @@ using System.Threading.Tasks;
|
|||||||
|
|
||||||
namespace Barotrauma
|
namespace Barotrauma
|
||||||
{
|
{
|
||||||
public class PerformenceMonitor
|
public class PerformanceMonitor
|
||||||
{
|
{
|
||||||
static public PerformenceMonitor PM;
|
static public PerformanceMonitor PM;
|
||||||
|
|
||||||
private Stopwatch PMStopwatch = new Stopwatch();
|
private Stopwatch PMStopwatch = new Stopwatch();
|
||||||
|
|
||||||
@@ -111,7 +111,7 @@ namespace Barotrauma
|
|||||||
get; set;
|
get; set;
|
||||||
}
|
}
|
||||||
|
|
||||||
public PerformenceMonitor()
|
public PerformanceMonitor()
|
||||||
{
|
{
|
||||||
PM = this;
|
PM = this;
|
||||||
RealTickRate = 60;
|
RealTickRate = 60;
|
||||||
@@ -161,7 +161,7 @@ namespace Barotrauma
|
|||||||
}
|
}
|
||||||
override public string ToString()
|
override public string ToString()
|
||||||
{
|
{
|
||||||
return $"Server Performence Info \n" +
|
return $"Server Performance Info \n" +
|
||||||
$"Item Count: {ItemCount}\n" +
|
$"Item Count: {ItemCount}\n" +
|
||||||
$"Character Count: {CharacterCount}\n" +
|
$"Character Count: {CharacterCount}\n" +
|
||||||
$"Clients Count {ConnectClients}\n " +
|
$"Clients Count {ConnectClients}\n " +
|
||||||
|
|||||||
@@ -114,7 +114,7 @@ namespace Barotrauma
|
|||||||
public override void Update(double deltaTime)
|
public override void Update(double deltaTime)
|
||||||
{
|
{
|
||||||
|
|
||||||
#warning For now CL side performence counter is partly useless bucz multiple changes on such things. Need time to take care of it
|
#warning For now CL side performance counter is partly useless bucz multiple changes on such things. Need time to take care of it
|
||||||
|
|
||||||
#if RUN_PHYSICS_IN_SEPARATE_THREAD
|
#if RUN_PHYSICS_IN_SEPARATE_THREAD
|
||||||
physicsTime += deltaTime;
|
physicsTime += deltaTime;
|
||||||
|
|||||||
Reference in New Issue
Block a user