diff options
author | Justin Clark-Casey (justincc) | 2012-03-16 00:34:30 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2012-03-19 21:31:38 +0000 |
commit | a9a77bb3ab73b96e95daafa6dccfe438439f1aef (patch) | |
tree | 0e3e7491b97a1a390e80e618bef9b18f93397bbf /OpenSim/Region/ScriptEngine/Interfaces/IScriptInstance.cs | |
parent | Remove property/field duplication in ScriptInstance where it's unnecessary. (diff) | |
download | opensim-SC_OLD-a9a77bb3ab73b96e95daafa6dccfe438439f1aef.zip opensim-SC_OLD-a9a77bb3ab73b96e95daafa6dccfe438439f1aef.tar.gz opensim-SC_OLD-a9a77bb3ab73b96e95daafa6dccfe438439f1aef.tar.bz2 opensim-SC_OLD-a9a77bb3ab73b96e95daafa6dccfe438439f1aef.tar.xz |
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.
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Interfaces/IScriptInstance.cs')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Interfaces/IScriptInstance.cs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/OpenSim/Region/ScriptEngine/Interfaces/IScriptInstance.cs b/OpenSim/Region/ScriptEngine/Interfaces/IScriptInstance.cs index 8762642..11f54a2 100644 --- a/OpenSim/Region/ScriptEngine/Interfaces/IScriptInstance.cs +++ b/OpenSim/Region/ScriptEngine/Interfaces/IScriptInstance.cs | |||
@@ -78,6 +78,21 @@ namespace OpenSim.Region.ScriptEngine.Interfaces | |||
78 | /// </summary> | 78 | /// </summary> |
79 | string State { get; set; } | 79 | string State { get; set; } |
80 | 80 | ||
81 | /// <summary> | ||
82 | /// Time the script was last started | ||
83 | /// </summary> | ||
84 | DateTime TimeStarted { get; } | ||
85 | |||
86 | /// <summary> | ||
87 | /// Tick the last measurement period was started. | ||
88 | /// </summary> | ||
89 | long MeasurementPeriodTickStart { get; } | ||
90 | |||
91 | /// <summary> | ||
92 | /// Ticks spent executing in the last measurement period. | ||
93 | /// </summary> | ||
94 | long MeasurementPeriodExecutionTime { get; } | ||
95 | |||
81 | IScriptEngine Engine { get; } | 96 | IScriptEngine Engine { get; } |
82 | UUID AppDomain { get; set; } | 97 | UUID AppDomain { get; set; } |
83 | string PrimName { get; } | 98 | string PrimName { get; } |