From a3bed1fbcbcbe19681aa57733f260ef647a33d8e Mon Sep 17 00:00:00 2001 From: Oren Hurvitz Date: Mon, 27 Jul 2015 12:16:21 +0300 Subject: Report "Script Execution Time" as the time spent executing the script in the last 30 seconds. Use a sliding window to calculate this. Notes: - This metric provides a better indication of which scripts are taking up a lot of CPU (and therefore should be optimized). - Previously the execution time was reset to 0 in every new measurement period, causing the reported time to fluctuate for no reason. This has been fixed by using a sliding window. --- OpenSim/Region/ScriptEngine/Interfaces/IScriptInstance.cs | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'OpenSim/Region/ScriptEngine/Interfaces/IScriptInstance.cs') diff --git a/OpenSim/Region/ScriptEngine/Interfaces/IScriptInstance.cs b/OpenSim/Region/ScriptEngine/Interfaces/IScriptInstance.cs index fa2ceef..f695eba 100644 --- a/OpenSim/Region/ScriptEngine/Interfaces/IScriptInstance.cs +++ b/OpenSim/Region/ScriptEngine/Interfaces/IScriptInstance.cs @@ -109,14 +109,9 @@ namespace OpenSim.Region.ScriptEngine.Interfaces DateTime TimeStarted { get; } /// - /// Tick the last measurement period was started. + /// Collects information about how long the script was executed. /// - long MeasurementPeriodTickStart { get; } - - /// - /// Ticks spent executing in the last measurement period. - /// - long MeasurementPeriodExecutionTime { get; } + MetricsCollectorTime ExecutionTime { get; } /// /// Scene part in which this script instance is contained. -- cgit v1.1