diff options
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index 10165d3..7f739b1 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | |||
@@ -1952,5 +1952,27 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1952 | 1952 | ||
1953 | return key.ToString(); | 1953 | return key.ToString(); |
1954 | } | 1954 | } |
1955 | |||
1956 | /// <summary> | ||
1957 | /// Return information regarding various simulator statistics (sim fps, physics fps, time | ||
1958 | /// dilation, total number of prims, total number of active scripts, script lps, various | ||
1959 | /// timing data, packets in/out, etc. Basically much the information that's shown in the | ||
1960 | /// client's Statistics Bar (Ctrl-Shift-1) | ||
1961 | /// </summary> | ||
1962 | /// <returns>List of floats</returns> | ||
1963 | public LSL_List osGetRegionStats() | ||
1964 | { | ||
1965 | CheckThreatLevel(ThreatLevel.Moderate, "osGetRegionStats"); | ||
1966 | m_host.AddScriptLPS(1); | ||
1967 | LSL_List ret = new LSL_List(); | ||
1968 | float[] stats = World.SimulatorStats; | ||
1969 | |||
1970 | for (int i = 0; i < 21; i++) | ||
1971 | { | ||
1972 | ret.Add(new LSL_Float( stats[i] )); | ||
1973 | } | ||
1974 | return ret; | ||
1975 | } | ||
1976 | |||
1955 | } | 1977 | } |
1956 | } | 1978 | } |