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.
This commit is contained in:
Oren Hurvitz
2015-07-27 12:16:21 +03:00
parent 287096d826
commit a3bed1fbcb
4 changed files with 241 additions and 51 deletions

View File

@@ -109,14 +109,9 @@ namespace OpenSim.Region.ScriptEngine.Interfaces
DateTime TimeStarted { get; }
/// <summary>
/// Tick the last measurement period was started.
/// Collects information about how long the script was executed.
/// </summary>
long MeasurementPeriodTickStart { get; }
/// <summary>
/// Ticks spent executing in the last measurement period.
/// </summary>
long MeasurementPeriodExecutionTime { get; }
MetricsCollectorTime ExecutionTime { get; }
/// <summary>
/// Scene part in which this script instance is contained.