diff options
author | Teravus Ovares | 2008-05-25 20:50:45 +0000 |
---|---|---|
committer | Teravus Ovares | 2008-05-25 20:50:45 +0000 |
commit | c20f7d6171a9df151c3ccde063336338da9ae322 (patch) | |
tree | a6093b52da4093e3b692771a421ce4a55052d24b /OpenSim/Region/Environment/Modules | |
parent | Thank you very much, Melanie for a patch that: (diff) | |
download | opensim-SC_OLD-c20f7d6171a9df151c3ccde063336338da9ae322.zip opensim-SC_OLD-c20f7d6171a9df151c3ccde063336338da9ae322.tar.gz opensim-SC_OLD-c20f7d6171a9df151c3ccde063336338da9ae322.tar.bz2 opensim-SC_OLD-c20f7d6171a9df151c3ccde063336338da9ae322.tar.xz |
* A hacky Top Scripts display. It isn't accurate as far as ms accounting, however you can use it to help find out what scripts are causing your simulator to cry.
* Access it from the Estate tools/Debug tab.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Environment/Modules/World/Estate/EstateManagementModule.cs | 36 |
1 files changed, 27 insertions, 9 deletions
diff --git a/OpenSim/Region/Environment/Modules/World/Estate/EstateManagementModule.cs b/OpenSim/Region/Environment/Modules/World/Estate/EstateManagementModule.cs index d3aa4aa..ab5898d 100644 --- a/OpenSim/Region/Environment/Modules/World/Estate/EstateManagementModule.cs +++ b/OpenSim/Region/Environment/Modules/World/Estate/EstateManagementModule.cs | |||
@@ -313,12 +313,21 @@ namespace OpenSim.Region.Environment.Modules.World.Estate | |||
313 | } | 313 | } |
314 | private void HandleLandStatRequest(int parcelID, uint reportType, uint requestFlags, string filter, IClientAPI remoteClient) | 314 | private void HandleLandStatRequest(int parcelID, uint reportType, uint requestFlags, string filter, IClientAPI remoteClient) |
315 | { | 315 | { |
316 | Dictionary<uint, float> colliders = m_scene.PhysicsScene.GetTopColliders(); | 316 | Dictionary<uint, float> SceneData = new Dictionary<uint,float>(); |
317 | 317 | ||
318 | List<LandStatReportItem> collidera = new List<LandStatReportItem>(); | 318 | if (reportType == 1) |
319 | lock (colliders) | 319 | { |
320 | SceneData = m_scene.PhysicsScene.GetTopColliders(); | ||
321 | } | ||
322 | else if (reportType == 0) | ||
320 | { | 323 | { |
321 | foreach (uint obj in colliders.Keys) | 324 | SceneData = m_scene.m_innerScene.GetTopScripts(); |
325 | } | ||
326 | |||
327 | List<LandStatReportItem> SceneReport = new List<LandStatReportItem>(); | ||
328 | lock (SceneData) | ||
329 | { | ||
330 | foreach (uint obj in SceneData.Keys) | ||
322 | { | 331 | { |
323 | SceneObjectPart prt = m_scene.GetSceneObjectPart(obj); | 332 | SceneObjectPart prt = m_scene.GetSceneObjectPart(obj); |
324 | if (prt != null) | 333 | if (prt != null) |
@@ -332,21 +341,30 @@ namespace OpenSim.Region.Environment.Modules.World.Estate | |||
332 | lsri.LocationX = sog.AbsolutePosition.X; | 341 | lsri.LocationX = sog.AbsolutePosition.X; |
333 | lsri.LocationY = sog.AbsolutePosition.Y; | 342 | lsri.LocationY = sog.AbsolutePosition.Y; |
334 | lsri.LocationZ = sog.AbsolutePosition.Z; | 343 | lsri.LocationZ = sog.AbsolutePosition.Z; |
335 | lsri.Score = colliders[obj]; | 344 | lsri.Score = SceneData[obj]; |
336 | lsri.TaskID = sog.UUID; | 345 | lsri.TaskID = sog.UUID; |
337 | lsri.TaskLocalID = sog.LocalId; | 346 | lsri.TaskLocalID = sog.LocalId; |
338 | lsri.TaskName = sog.GetPartName(obj); | 347 | lsri.TaskName = sog.GetPartName(obj); |
339 | lsri.OwnerName = m_scene.CommsManager.UUIDNameRequestString(sog.OwnerID); | 348 | lsri.OwnerName = m_scene.CommsManager.UUIDNameRequestString(sog.OwnerID); |
340 | 349 | if (filter.Length != 0) | |
350 | { | ||
351 | if ((lsri.OwnerName.Contains(filter) || lsri.TaskName.Contains(filter))) | ||
352 | { | ||
353 | } | ||
354 | else | ||
355 | { | ||
356 | continue; | ||
357 | } | ||
358 | } | ||
341 | 359 | ||
342 | collidera.Add(lsri); | 360 | SceneReport.Add(lsri); |
343 | } | 361 | } |
344 | } | 362 | } |
345 | } | 363 | } |
346 | 364 | ||
347 | } | 365 | } |
348 | } | 366 | } |
349 | remoteClient.SendLandStatReply(reportType, requestFlags, (uint)collidera.Count,collidera.ToArray()); | 367 | remoteClient.SendLandStatReply(reportType, requestFlags, (uint)SceneReport.Count,SceneReport.ToArray()); |
350 | 368 | ||
351 | } | 369 | } |
352 | 370 | ||