Changeset 359 for binary-improvements/MapRendering
- Timestamp:
- Oct 29, 2019, 11:20:45 AM (5 years ago)
- Location:
- binary-improvements/MapRendering/Commands
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
binary-improvements/MapRendering/Commands/EnableOpenIDDebug.cs
r325 r359 14 14 15 15 public override void Execute (List<string> _params, CommandSenderInfo _senderInfo) { 16 try { 17 if (_params.Count != 1) { 18 SdtdConsole.Instance.Output ("Current state: " + OpenID.debugOpenId); 19 return; 20 } 16 if (_params.Count != 1) { 17 SdtdConsole.Instance.Output ("Current state: " + OpenID.debugOpenId); 18 return; 19 } 21 20 22 OpenID.debugOpenId = _params [0].Equals ("1"); 23 SdtdConsole.Instance.Output ("Set OpenID debugging to " + _params [0].Equals ("1")); 24 } catch (Exception e) { 25 Log.Out ("Error in EnableOpenIDDebug.Run: " + e); 26 } 21 OpenID.debugOpenId = _params [0].Equals ("1"); 22 SdtdConsole.Instance.Output ("Set OpenID debugging to " + _params [0].Equals ("1")); 27 23 } 28 24 } -
binary-improvements/MapRendering/Commands/EnableRendering.cs
r325 r359 13 13 14 14 public override void Execute (List<string> _params, CommandSenderInfo _senderInfo) { 15 try { 16 if (_params.Count != 1) { 17 SdtdConsole.Instance.Output ("Current state: " + MapRendering.MapRendering.renderingEnabled); 18 return; 19 } 15 if (_params.Count != 1) { 16 SdtdConsole.Instance.Output ("Current state: " + MapRendering.MapRendering.renderingEnabled); 17 return; 18 } 20 19 21 MapRendering.MapRendering.renderingEnabled = _params [0].Equals ("1"); 22 SdtdConsole.Instance.Output ("Set live map rendering to " + _params [0].Equals ("1")); 23 } catch (Exception e) { 24 Log.Out ("Error in EnableRendering.Run: " + e); 25 } 20 MapRendering.MapRendering.renderingEnabled = _params [0].Equals ("1"); 21 SdtdConsole.Instance.Output ("Set live map rendering to " + _params [0].Equals ("1")); 26 22 } 27 23 } -
binary-improvements/MapRendering/Commands/ReloadWebPermissions.cs
r325 r359 14 14 15 15 public override void Execute (List<string> _params, CommandSenderInfo _senderInfo) { 16 try { 17 WebPermissions.Instance.Load (); 18 SdtdConsole.Instance.Output ("Web permissions file reloaded"); 19 } catch (Exception e) { 20 Log.Out ("Error in ReloadWebPermissions.Run: " + e); 21 } 16 WebPermissions.Instance.Load (); 17 SdtdConsole.Instance.Output ("Web permissions file reloaded"); 22 18 } 23 19 } -
binary-improvements/MapRendering/Commands/RenderMap.cs
r325 r359 13 13 14 14 public override void Execute (List<string> _params, CommandSenderInfo _senderInfo) { 15 try { 16 MapRendering.MapRendering.Instance.RenderFullMap (); 15 MapRendering.MapRendering.Instance.RenderFullMap (); 17 16 18 SdtdConsole.Instance.Output ("Render map done"); 19 } catch (Exception e) { 20 Log.Out ("Error in RenderMap.Run: " + e); 21 } 17 SdtdConsole.Instance.Output ("Render map done"); 22 18 } 23 19 } -
binary-improvements/MapRendering/Commands/webstat.cs
r325 r359 14 14 15 15 public override void Execute (List<string> _params, CommandSenderInfo _senderInfo) { 16 try { 17 int curHandlers = Web.currentHandlers; 18 int totalHandlers = Web.handlingCount; 19 long totalTime = Web.totalHandlingTime; 20 SdtdConsole.Instance.Output ("Current Web handlers: " + curHandlers + " - total: " + totalHandlers); 21 SdtdConsole.Instance.Output (" - Total time: " + totalTime + " µs - average time: " + 22 totalTime / totalHandlers + " µs"); 16 int curHandlers = Web.currentHandlers; 17 int totalHandlers = Web.handlingCount; 18 long totalTime = Web.totalHandlingTime; 19 SdtdConsole.Instance.Output ("Current Web handlers: " + curHandlers + " - total: " + totalHandlers); 20 SdtdConsole.Instance.Output (" - Total time: " + totalTime + " µs - average time: " + 21 totalTime / totalHandlers + " µs"); 23 22 24 curHandlers = WebCommandResult.currentHandlers; 25 totalHandlers = WebCommandResult.handlingCount; 26 totalTime = WebCommandResult.totalHandlingTime; 27 SdtdConsole.Instance.Output ("Current Web command handlers: " + curHandlers + " - total: " + 28 totalHandlers); 29 SdtdConsole.Instance.Output (" - Total time: " + totalTime + " µs" + 30 (totalHandlers > 0 31 ? " - average time: " + totalTime / totalHandlers + " µs" 32 : "")); 33 } catch (Exception e) { 34 Log.Out ("Error in webstat.Run: " + e); 35 } 23 curHandlers = WebCommandResult.currentHandlers; 24 totalHandlers = WebCommandResult.handlingCount; 25 totalTime = WebCommandResult.totalHandlingTime; 26 SdtdConsole.Instance.Output ("Current Web command handlers: " + curHandlers + " - total: " + 27 totalHandlers); 28 SdtdConsole.Instance.Output (" - Total time: " + totalTime + " µs" + 29 (totalHandlers > 0 30 ? " - average time: " + totalTime / totalHandlers + " µs" 31 : "")); 36 32 } 37 33 }
Note:
See TracChangeset
for help on using the changeset viewer.