diff options
author | Justin Clark-Casey (justincc) | 2012-03-16 00:34:30 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2012-03-16 00:34:30 +0000 |
commit | a4b01ef38a735ffe70b402061871a9c99f2757ed (patch) | |
tree | b60dcc1cbfaeb0cb0184f4b9619a7e95afe0a4de /OpenSim/Region/Framework/Interfaces | |
parent | Merge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff) | |
download | opensim-SC-a4b01ef38a735ffe70b402061871a9c99f2757ed.zip opensim-SC-a4b01ef38a735ffe70b402061871a9c99f2757ed.tar.gz opensim-SC-a4b01ef38a735ffe70b402061871a9c99f2757ed.tar.bz2 opensim-SC-a4b01ef38a735ffe70b402061871a9c99f2757ed.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/Framework/Interfaces')
-rw-r--r-- | OpenSim/Region/Framework/Interfaces/IScriptModule.cs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/OpenSim/Region/Framework/Interfaces/IScriptModule.cs b/OpenSim/Region/Framework/Interfaces/IScriptModule.cs index 18c45dd..9fb4a25 100644 --- a/OpenSim/Region/Framework/Interfaces/IScriptModule.cs +++ b/OpenSim/Region/Framework/Interfaces/IScriptModule.cs | |||
@@ -27,6 +27,7 @@ | |||
27 | 27 | ||
28 | using System; | 28 | using System; |
29 | using System.Collections; | 29 | using System.Collections; |
30 | using System.Collections.Generic; | ||
30 | using OpenMetaverse; | 31 | using OpenMetaverse; |
31 | 32 | ||
32 | namespace OpenSim.Region.Framework.Interfaces | 33 | namespace OpenSim.Region.Framework.Interfaces |
@@ -74,5 +75,11 @@ namespace OpenSim.Region.Framework.Interfaces | |||
74 | /// Starts the processing threads. | 75 | /// Starts the processing threads. |
75 | /// </summary> | 76 | /// </summary> |
76 | void StartProcessing(); | 77 | void StartProcessing(); |
78 | |||
79 | /// <summary> | ||
80 | /// Get the execution times of all scripts in each object. | ||
81 | /// </summary> | ||
82 | /// <returns>A dictionary where the key is a local object ID and the value is an execution time in milliseconds.</returns> | ||
83 | Dictionary<uint, float> GetObjectScriptsExecutionTimes(); | ||
77 | } | 84 | } |
78 | } | 85 | } \ No newline at end of file |