Replace script-lines-per-second with the script execution time scaled by its measurement period and an idealised frame time.

The previous lines-per-second measurement used for top scripts report was inaccurate, since lines executed does not reflect time taken to execute.
Also, every fetch of the report would reset all the numbers limiting its usefulness and we weren't even guaranteed to see the top 100.
The actual measurement value should be script execution time per frame but XEngine does not work this way.
Therefore, we use actual script execution time scaled by the measurement period and an idealised frame time.
This is still not ideal but gives reasonable results and allows scripts to be compared.
This commit moves script execution time calculations from SceneGraph into IScriptModule implementations.
This commit is contained in:
Justin Clark-Casey (justincc)
2012-03-16 00:34:30 +00:00
parent 0548eeb571
commit a4b01ef38a
7 changed files with 145 additions and 70 deletions

View File

@@ -78,6 +78,21 @@ namespace OpenSim.Region.ScriptEngine.Interfaces
/// </summary>
string State { get; set; }
/// <summary>
/// Time the script was last started
/// </summary>
DateTime TimeStarted { get; }
/// <summary>
/// Tick the last measurement period was started.
/// </summary>
long MeasurementPeriodTickStart { get; }
/// <summary>
/// Ticks spent executing in the last measurement period.
/// </summary>
long MeasurementPeriodExecutionTime { get; }
IScriptEngine Engine { get; }
UUID AppDomain { get; set; }
string PrimName { get; }