aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework
diff options
context:
space:
mode:
authorDan Lake2012-02-01 16:25:35 -0800
committerDan Lake2012-02-01 16:25:35 -0800
commitc10193c72b1f029a958f04d2f5d7ee384e693aaa (patch)
tree052ec7e973c15b158310511197affad14eb9c64f /OpenSim/Framework
parentTrigger event when prims are scheduled for an update. This gives modules earl... (diff)
parentSmall optimization to last commit (diff)
downloadopensim-SC_OLD-c10193c72b1f029a958f04d2f5d7ee384e693aaa.zip
opensim-SC_OLD-c10193c72b1f029a958f04d2f5d7ee384e693aaa.tar.gz
opensim-SC_OLD-c10193c72b1f029a958f04d2f5d7ee384e693aaa.tar.bz2
opensim-SC_OLD-c10193c72b1f029a958f04d2f5d7ee384e693aaa.tar.xz
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r--OpenSim/Framework/EstateSettings.cs6
-rw-r--r--OpenSim/Framework/IClientAPI.cs13
-rw-r--r--OpenSim/Framework/ILandObject.cs6
-rw-r--r--OpenSim/Framework/IMoneyModule.cs4
-rw-r--r--OpenSim/Framework/IProfileModule.cs37
-rw-r--r--OpenSim/Framework/RegionSettings.cs94
-rw-r--r--OpenSim/Framework/Serialization/External/ExternalRepresentationUtils.cs8
-rw-r--r--OpenSim/Framework/Servers/BaseOpenSimServer.cs2
-rw-r--r--OpenSim/Framework/Statistics/SimExtraStatsCollector.cs248
9 files changed, 251 insertions, 167 deletions
diff --git a/OpenSim/Framework/EstateSettings.cs b/OpenSim/Framework/EstateSettings.cs
index 2a495b0..98604f2 100644
--- a/OpenSim/Framework/EstateSettings.cs
+++ b/OpenSim/Framework/EstateSettings.cs
@@ -373,5 +373,11 @@ namespace OpenSim.Framework
373 373
374 return l_EstateAccess.Contains(user); 374 return l_EstateAccess.Contains(user);
375 } 375 }
376
377 public bool GroupAccess(UUID groupID)
378 {
379 return l_EstateGroups.Contains(groupID);
380 }
381
376 } 382 }
377} 383}
diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs
index 258b3eb..1326fe9 100644
--- a/OpenSim/Framework/IClientAPI.cs
+++ b/OpenSim/Framework/IClientAPI.cs
@@ -358,6 +358,8 @@ namespace OpenSim.Framework
358 358
359 public delegate void EstateChangeInfo(IClientAPI client, UUID invoice, UUID senderID, UInt32 param1, UInt32 param2); 359 public delegate void EstateChangeInfo(IClientAPI client, UUID invoice, UUID senderID, UInt32 param1, UInt32 param2);
360 360
361 public delegate void EstateManageTelehub(IClientAPI client, UUID invoice, UUID senderID, string cmd, UInt32 param1);
362
361 public delegate void RequestTerrain(IClientAPI remoteClient, string clientFileName); 363 public delegate void RequestTerrain(IClientAPI remoteClient, string clientFileName);
362 364
363 public delegate void BakeTerrain(IClientAPI remoteClient); 365 public delegate void BakeTerrain(IClientAPI remoteClient);
@@ -769,6 +771,7 @@ namespace OpenSim.Framework
769 event ModifyTerrain OnModifyTerrain; 771 event ModifyTerrain OnModifyTerrain;
770 event BakeTerrain OnBakeTerrain; 772 event BakeTerrain OnBakeTerrain;
771 event EstateChangeInfo OnEstateChangeInfo; 773 event EstateChangeInfo OnEstateChangeInfo;
774 event EstateManageTelehub OnEstateManageTelehub;
772 // [Obsolete("LLClientView Specific.")] 775 // [Obsolete("LLClientView Specific.")]
773 event SetAppearance OnSetAppearance; 776 event SetAppearance OnSetAppearance;
774 // [Obsolete("LLClientView Specific - Replace and rename OnAvatarUpdate. Difference from SetAppearance?")] 777 // [Obsolete("LLClientView Specific - Replace and rename OnAvatarUpdate. Difference from SetAppearance?")]
@@ -1074,7 +1077,15 @@ namespace OpenSim.Framework
1074 void SendWindData(Vector2[] windSpeeds); 1077 void SendWindData(Vector2[] windSpeeds);
1075 void SendCloudData(float[] cloudCover); 1078 void SendCloudData(float[] cloudCover);
1076 1079
1080 /// <summary>
1081 /// Sent when an agent completes its movement into a region.
1082 /// </summary>
1083 /// <remarks>
1084 /// This packet marks completion of the arrival of a root avatar in a region, whether through login, region
1085 /// crossing or direct teleport.
1086 /// </remarks>
1077 void MoveAgentIntoRegion(RegionInfo regInfo, Vector3 pos, Vector3 look); 1087 void MoveAgentIntoRegion(RegionInfo regInfo, Vector3 pos, Vector3 look);
1088
1078 void InformClientOfNeighbour(ulong neighbourHandle, IPEndPoint neighbourExternalEndPoint); 1089 void InformClientOfNeighbour(ulong neighbourHandle, IPEndPoint neighbourExternalEndPoint);
1079 1090
1080 /// <summary> 1091 /// <summary>
@@ -1133,6 +1144,8 @@ namespace OpenSim.Framework
1133 1144
1134 void SendTaskInventory(UUID taskID, short serial, byte[] fileName); 1145 void SendTaskInventory(UUID taskID, short serial, byte[] fileName);
1135 1146
1147 void SendTelehubInfo(UUID ObjectID, string ObjectName, Vector3 ObjectPos, Quaternion ObjectRot, List<Vector3> SpawnPoint);
1148
1136 /// <summary> 1149 /// <summary>
1137 /// Used by the server to inform the client of new inventory items and folders. 1150 /// Used by the server to inform the client of new inventory items and folders.
1138 /// </summary> 1151 /// </summary>
diff --git a/OpenSim/Framework/ILandObject.cs b/OpenSim/Framework/ILandObject.cs
index 0316944..f75a990 100644
--- a/OpenSim/Framework/ILandObject.cs
+++ b/OpenSim/Framework/ILandObject.cs
@@ -130,5 +130,11 @@ namespace OpenSim.Framework
130 /// </summary> 130 /// </summary>
131 /// <param name="url"></param> 131 /// <param name="url"></param>
132 void SetMusicUrl(string url); 132 void SetMusicUrl(string url);
133
134 /// <summary>
135 /// Get the music url for this land parcel
136 /// </summary>
137 /// <returns>The music url.</returns>
138 string GetMusicUrl();
133 } 139 }
134} 140}
diff --git a/OpenSim/Framework/IMoneyModule.cs b/OpenSim/Framework/IMoneyModule.cs
index 3d4873d..1e09728 100644
--- a/OpenSim/Framework/IMoneyModule.cs
+++ b/OpenSim/Framework/IMoneyModule.cs
@@ -36,8 +36,8 @@ namespace OpenSim.Framework
36 int amount); 36 int amount);
37 37
38 int GetBalance(UUID agentID); 38 int GetBalance(UUID agentID);
39 bool UploadCovered(IClientAPI client, int amount); 39 bool UploadCovered(UUID agentID, int amount);
40 bool AmountCovered(IClientAPI client, int amount); 40 bool AmountCovered(UUID agentID, int amount);
41 void ApplyCharge(UUID agentID, int amount, string text); 41 void ApplyCharge(UUID agentID, int amount, string text);
42 void ApplyUploadCharge(UUID agentID, int amount, string text); 42 void ApplyUploadCharge(UUID agentID, int amount, string text);
43 43
diff --git a/OpenSim/Framework/IProfileModule.cs b/OpenSim/Framework/IProfileModule.cs
deleted file mode 100644
index ef03d4a..0000000
--- a/OpenSim/Framework/IProfileModule.cs
+++ /dev/null
@@ -1,37 +0,0 @@
1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using OpenMetaverse;
29
30namespace OpenSim.Framework
31{
32 public interface IProfileModule
33 {
34 void RequestAvatarProperties(IClientAPI remoteClient, UUID avatarID);
35
36 }
37}
diff --git a/OpenSim/Framework/RegionSettings.cs b/OpenSim/Framework/RegionSettings.cs
index 673cf20..91e07df 100644
--- a/OpenSim/Framework/RegionSettings.cs
+++ b/OpenSim/Framework/RegionSettings.cs
@@ -26,11 +26,53 @@
26 */ 26 */
27 27
28using System; 28using System;
29using System.Collections.Generic;
29using System.IO; 30using System.IO;
30using OpenMetaverse; 31using OpenMetaverse;
31 32
32namespace OpenSim.Framework 33namespace OpenSim.Framework
33{ 34{
35 public struct SpawnPoint
36 {
37 public float Yaw;
38 public float Pitch;
39 public float Distance;
40
41 public void SetLocation(Vector3 pos, Quaternion rot, Vector3 point)
42 {
43 // The point is an absolute position, so we need the relative
44 // location to the spawn point
45 Vector3 offset = point - pos;
46 Distance = Vector3.Mag(offset);
47
48 // Next we need to rotate this vector into the spawn point's
49 // coordinate system
50 rot.W = -rot.W;
51 offset = offset * rot;
52
53 Vector3 dir = Vector3.Normalize(offset);
54
55 // Get the bearing (yaw)
56 Yaw = (float)Math.Atan2(dir.Y, dir.X);
57
58 // Get the elevation (pitch)
59 Pitch = (float)-Math.Atan2(dir.Z, Math.Sqrt(dir.X * dir.X + dir.Y * dir.Y));
60 }
61
62 public Vector3 GetLocation(Vector3 pos, Quaternion rot)
63 {
64 Quaternion y = Quaternion.CreateFromEulers(0, 0, Yaw);
65 Quaternion p = Quaternion.CreateFromEulers(0, Pitch, 0);
66
67 Vector3 dir = new Vector3(1, 0, 0) * p * y;
68 Vector3 offset = dir * (float)Distance;
69
70 offset *= rot;
71
72 return pos + offset;
73 }
74 }
75
34 public class RegionSettings 76 public class RegionSettings
35 { 77 {
36 public delegate void SaveDelegate(RegionSettings rs); 78 public delegate void SaveDelegate(RegionSettings rs);
@@ -331,6 +373,14 @@ namespace OpenSim.Framework
331 set { m_SunVector = value; } 373 set { m_SunVector = value; }
332 } 374 }
333 375
376 private UUID m_ParcelImageID;
377
378 public UUID ParcelImageID
379 {
380 get { return m_ParcelImageID; }
381 set { m_ParcelImageID = value; }
382 }
383
334 private UUID m_TerrainImageID; 384 private UUID m_TerrainImageID;
335 385
336 public UUID TerrainImageID 386 public UUID TerrainImageID
@@ -397,5 +447,49 @@ namespace OpenSim.Framework
397 set { m_LoadedCreationID = value; } 447 set { m_LoadedCreationID = value; }
398 } 448 }
399 449
450 // Connected Telehub object
451 private UUID m_TelehubObject;
452 public UUID TelehubObject
453 {
454 get
455 {
456 return m_TelehubObject;
457 }
458 set
459 {
460 m_TelehubObject = value;
461 }
462 }
463
464 // Our Connected Telehub's SpawnPoints
465 public List<SpawnPoint> l_SpawnPoints = new List<SpawnPoint>();
466
467 // Add a SpawnPoint
468 // ** These are not region coordinates **
469 // They are relative to the Telehub coordinates
470 //
471 public void AddSpawnPoint(SpawnPoint point)
472 {
473 l_SpawnPoints.Add(point);
474 }
475
476 // Remove a SpawnPoint
477 public void RemoveSpawnPoint(int point_index)
478 {
479 l_SpawnPoints.RemoveAt(point_index);
480 }
481
482 // Return the List of SpawnPoints
483 public List<SpawnPoint> SpawnPoints()
484 {
485 return l_SpawnPoints;
486
487 }
488
489 // Clear the SpawnPoints List of all entries
490 public void ClearSpawnPoints()
491 {
492 l_SpawnPoints.Clear();
493 }
400 } 494 }
401} 495}
diff --git a/OpenSim/Framework/Serialization/External/ExternalRepresentationUtils.cs b/OpenSim/Framework/Serialization/External/ExternalRepresentationUtils.cs
index 6e8c2ee..7447ac2 100644
--- a/OpenSim/Framework/Serialization/External/ExternalRepresentationUtils.cs
+++ b/OpenSim/Framework/Serialization/External/ExternalRepresentationUtils.cs
@@ -44,13 +44,13 @@ namespace OpenSim.Framework.Serialization.External
44 /// with creator data added to it. 44 /// with creator data added to it.
45 /// </summary> 45 /// </summary>
46 /// <param name="xml">The SceneObjectPart represented in XML2</param> 46 /// <param name="xml">The SceneObjectPart represented in XML2</param>
47 /// <param name="profileURL">The URL of the profile service for the creator</param> 47 /// <param name="homeURL">The URL of the user agents service (home) for the creator</param>
48 /// <param name="userService">The service for retrieving user account information</param> 48 /// <param name="userService">The service for retrieving user account information</param>
49 /// <param name="scopeID">The scope of the user account information (Grid ID)</param> 49 /// <param name="scopeID">The scope of the user account information (Grid ID)</param>
50 /// <returns>The SceneObjectPart represented in XML2</returns> 50 /// <returns>The SceneObjectPart represented in XML2</returns>
51 public static string RewriteSOP(string xml, string profileURL, IUserAccountService userService, UUID scopeID) 51 public static string RewriteSOP(string xml, string homeURL, IUserAccountService userService, UUID scopeID)
52 { 52 {
53 if (xml == string.Empty || profileURL == string.Empty || userService == null) 53 if (xml == string.Empty || homeURL == string.Empty || userService == null)
54 return xml; 54 return xml;
55 55
56 XmlDocument doc = new XmlDocument(); 56 XmlDocument doc = new XmlDocument();
@@ -83,7 +83,7 @@ namespace OpenSim.Framework.Serialization.External
83 if (!hasCreatorData && creator != null) 83 if (!hasCreatorData && creator != null)
84 { 84 {
85 XmlElement creatorData = doc.CreateElement("CreatorData"); 85 XmlElement creatorData = doc.CreateElement("CreatorData");
86 creatorData.InnerText = profileURL + "/" + creator.PrincipalID + ";" + creator.FirstName + " " + creator.LastName; 86 creatorData.InnerText = homeURL + ";" + creator.FirstName + " " + creator.LastName;
87 sop.AppendChild(creatorData); 87 sop.AppendChild(creatorData);
88 } 88 }
89 } 89 }
diff --git a/OpenSim/Framework/Servers/BaseOpenSimServer.cs b/OpenSim/Framework/Servers/BaseOpenSimServer.cs
index 4c381d0..545e76c 100644
--- a/OpenSim/Framework/Servers/BaseOpenSimServer.cs
+++ b/OpenSim/Framework/Servers/BaseOpenSimServer.cs
@@ -251,7 +251,7 @@ namespace OpenSim.Framework.Servers
251 251
252 sb.Append(threads.Length + " threads are being tracked:" + Environment.NewLine); 252 sb.Append(threads.Length + " threads are being tracked:" + Environment.NewLine);
253 253
254 int timeNow = Util.EnvironmentTickCount(); 254 int timeNow = Environment.TickCount & Int32.MaxValue;
255 255
256 sb.AppendFormat(reportFormat, "ID", "NAME", "LAST UPDATE (MS)", "LIFETIME (MS)", "PRIORITY", "STATE"); 256 sb.AppendFormat(reportFormat, "ID", "NAME", "LAST UPDATE (MS)", "LIFETIME (MS)", "PRIORITY", "STATE");
257 sb.Append(Environment.NewLine); 257 sb.Append(Environment.NewLine);
diff --git a/OpenSim/Framework/Statistics/SimExtraStatsCollector.cs b/OpenSim/Framework/Statistics/SimExtraStatsCollector.cs
index 5449757..a506e3b 100644
--- a/OpenSim/Framework/Statistics/SimExtraStatsCollector.cs
+++ b/OpenSim/Framework/Statistics/SimExtraStatsCollector.cs
@@ -42,15 +42,15 @@ namespace OpenSim.Framework.Statistics
42 { 42 {
43 private long abnormalClientThreadTerminations; 43 private long abnormalClientThreadTerminations;
44 44
45 private long assetsInCache; 45// private long assetsInCache;
46 private long texturesInCache; 46// private long texturesInCache;
47 private long assetCacheMemoryUsage; 47// private long assetCacheMemoryUsage;
48 private long textureCacheMemoryUsage; 48// private long textureCacheMemoryUsage;
49 private TimeSpan assetRequestTimeAfterCacheMiss; 49// private TimeSpan assetRequestTimeAfterCacheMiss;
50 private long blockedMissingTextureRequests; 50// private long blockedMissingTextureRequests;
51 51
52 private long assetServiceRequestFailures; 52// private long assetServiceRequestFailures;
53 private long inventoryServiceRetrievalFailures; 53// private long inventoryServiceRetrievalFailures;
54 54
55 private volatile float timeDilation; 55 private volatile float timeDilation;
56 private volatile float simFps; 56 private volatile float simFps;
@@ -79,27 +79,27 @@ namespace OpenSim.Framework.Statistics
79 /// </summary> 79 /// </summary>
80 public long AbnormalClientThreadTerminations { get { return abnormalClientThreadTerminations; } } 80 public long AbnormalClientThreadTerminations { get { return abnormalClientThreadTerminations; } }
81 81
82 /// <summary> 82// /// <summary>
83 /// These statistics are being collected by push rather than pull. Pull would be simpler, but I had the 83// /// These statistics are being collected by push rather than pull. Pull would be simpler, but I had the
84 /// notion of providing some flow statistics (which pull wouldn't give us). Though admittedly these 84// /// notion of providing some flow statistics (which pull wouldn't give us). Though admittedly these
85 /// haven't yet been implemented... 85// /// haven't yet been implemented...
86 /// </summary> 86// /// </summary>
87 public long AssetsInCache { get { return assetsInCache; } } 87// public long AssetsInCache { get { return assetsInCache; } }
88 88//
89 /// <value> 89// /// <value>
90 /// Currently unused 90// /// Currently unused
91 /// </value> 91// /// </value>
92 public long TexturesInCache { get { return texturesInCache; } } 92// public long TexturesInCache { get { return texturesInCache; } }
93 93//
94 /// <value> 94// /// <value>
95 /// Currently misleading since we can't currently subtract removed asset memory usage without a performance hit 95// /// Currently misleading since we can't currently subtract removed asset memory usage without a performance hit
96 /// </value> 96// /// </value>
97 public long AssetCacheMemoryUsage { get { return assetCacheMemoryUsage; } } 97// public long AssetCacheMemoryUsage { get { return assetCacheMemoryUsage; } }
98 98//
99 /// <value> 99// /// <value>
100 /// Currently unused 100// /// Currently unused
101 /// </value> 101// /// </value>
102 public long TextureCacheMemoryUsage { get { return textureCacheMemoryUsage; } } 102// public long TextureCacheMemoryUsage { get { return textureCacheMemoryUsage; } }
103 103
104 public float TimeDilation { get { return timeDilation; } } 104 public float TimeDilation { get { return timeDilation; } }
105 public float SimFps { get { return simFps; } } 105 public float SimFps { get { return simFps; } }
@@ -123,32 +123,33 @@ namespace OpenSim.Framework.Statistics
123 public float ActiveScripts { get { return activeScripts; } } 123 public float ActiveScripts { get { return activeScripts; } }
124 public float ScriptLinesPerSecond { get { return scriptLinesPerSecond; } } 124 public float ScriptLinesPerSecond { get { return scriptLinesPerSecond; } }
125 125
126 /// <summary> 126// /// <summary>
127 /// This is the time it took for the last asset request made in response to a cache miss. 127// /// This is the time it took for the last asset request made in response to a cache miss.
128 /// </summary> 128// /// </summary>
129 public TimeSpan AssetRequestTimeAfterCacheMiss { get { return assetRequestTimeAfterCacheMiss; } } 129// public TimeSpan AssetRequestTimeAfterCacheMiss { get { return assetRequestTimeAfterCacheMiss; } }
130 130//
131 /// <summary> 131// /// <summary>
132 /// Number of persistent requests for missing textures we have started blocking from clients. To some extent 132// /// Number of persistent requests for missing textures we have started blocking from clients. To some extent
133 /// this is just a temporary statistic to keep this problem in view - the root cause of this lies either 133// /// this is just a temporary statistic to keep this problem in view - the root cause of this lies either
134 /// in a mishandling of the reply protocol, related to avatar appearance or may even originate in graphics 134// /// in a mishandling of the reply protocol, related to avatar appearance or may even originate in graphics
135 /// driver bugs on clients (though this seems less likely). 135// /// driver bugs on clients (though this seems less likely).
136 /// </summary> 136// /// </summary>
137 public long BlockedMissingTextureRequests { get { return blockedMissingTextureRequests; } } 137// public long BlockedMissingTextureRequests { get { return blockedMissingTextureRequests; } }
138 138//
139 /// <summary> 139// /// <summary>
140 /// Record the number of times that an asset request has failed. Failures are effectively exceptions, such as 140// /// Record the number of times that an asset request has failed. Failures are effectively exceptions, such as
141 /// request timeouts. If an asset service replies that a particular asset cannot be found, this is not counted 141// /// request timeouts. If an asset service replies that a particular asset cannot be found, this is not counted
142 /// as a failure 142// /// as a failure
143 /// </summary> 143// /// </summary>
144 public long AssetServiceRequestFailures { get { return assetServiceRequestFailures; } } 144// public long AssetServiceRequestFailures { get { return assetServiceRequestFailures; } }
145 145
146 /// <summary> 146 /// <summary>
147 /// Number of known failures to retrieve avatar inventory from the inventory service. This does not 147 /// Number of known failures to retrieve avatar inventory from the inventory service. This does not
148 /// cover situations where the inventory service accepts the request but never returns any data, since 148 /// cover situations where the inventory service accepts the request but never returns any data, since
149 /// we do not yet timeout this situation. 149 /// we do not yet timeout this situation.
150 /// </summary> 150 /// </summary>
151 public long InventoryServiceRetrievalFailures { get { return inventoryServiceRetrievalFailures; } } 151 /// <remarks>Commented out because we do not cache inventory at this point</remarks>
152// public long InventoryServiceRetrievalFailures { get { return inventoryServiceRetrievalFailures; } }
152 153
153 /// <summary> 154 /// <summary>
154 /// Retrieve the total frame time (in ms) of the last frame 155 /// Retrieve the total frame time (in ms) of the last frame
@@ -171,58 +172,58 @@ namespace OpenSim.Framework.Statistics
171 abnormalClientThreadTerminations++; 172 abnormalClientThreadTerminations++;
172 } 173 }
173 174
174 public void AddAsset(AssetBase asset) 175// public void AddAsset(AssetBase asset)
175 { 176// {
176 assetsInCache++; 177// assetsInCache++;
177 //assetCacheMemoryUsage += asset.Data.Length; 178// //assetCacheMemoryUsage += asset.Data.Length;
178 } 179// }
179 180//
180 public void RemoveAsset(UUID uuid) 181// public void RemoveAsset(UUID uuid)
181 { 182// {
182 assetsInCache--; 183// assetsInCache--;
183 } 184// }
184 185//
185 public void AddTexture(AssetBase image) 186// public void AddTexture(AssetBase image)
186 { 187// {
187 if (image.Data != null) 188// if (image.Data != null)
188 { 189// {
189 texturesInCache++; 190// texturesInCache++;
190 191//
191 // This could have been a pull stat, though there was originally a nebulous idea to measure flow rates 192// // This could have been a pull stat, though there was originally a nebulous idea to measure flow rates
192 textureCacheMemoryUsage += image.Data.Length; 193// textureCacheMemoryUsage += image.Data.Length;
193 } 194// }
194 } 195// }
195 196//
196 /// <summary> 197// /// <summary>
197 /// Signal that the asset cache has been cleared. 198// /// Signal that the asset cache has been cleared.
198 /// </summary> 199// /// </summary>
199 public void ClearAssetCacheStatistics() 200// public void ClearAssetCacheStatistics()
200 { 201// {
201 assetsInCache = 0; 202// assetsInCache = 0;
202 assetCacheMemoryUsage = 0; 203// assetCacheMemoryUsage = 0;
203 texturesInCache = 0; 204// texturesInCache = 0;
204 textureCacheMemoryUsage = 0; 205// textureCacheMemoryUsage = 0;
205 } 206// }
206 207//
207 public void AddAssetRequestTimeAfterCacheMiss(TimeSpan ts) 208// public void AddAssetRequestTimeAfterCacheMiss(TimeSpan ts)
208 { 209// {
209 assetRequestTimeAfterCacheMiss = ts; 210// assetRequestTimeAfterCacheMiss = ts;
210 } 211// }
211 212//
212 public void AddBlockedMissingTextureRequest() 213// public void AddBlockedMissingTextureRequest()
213 { 214// {
214 blockedMissingTextureRequests++; 215// blockedMissingTextureRequests++;
215 } 216// }
216 217//
217 public void AddAssetServiceRequestFailure() 218// public void AddAssetServiceRequestFailure()
218 { 219// {
219 assetServiceRequestFailures++; 220// assetServiceRequestFailures++;
220 } 221// }
221 222
222 public void AddInventoryServiceRetrievalFailure() 223// public void AddInventoryServiceRetrievalFailure()
223 { 224// {
224 inventoryServiceRetrievalFailures++; 225// inventoryServiceRetrievalFailures++;
225 } 226// }
226 227
227 /// <summary> 228 /// <summary>
228 /// Register as a packet queue stats provider 229 /// Register as a packet queue stats provider
@@ -290,8 +291,8 @@ namespace OpenSim.Framework.Statistics
290 public override string Report() 291 public override string Report()
291 { 292 {
292 StringBuilder sb = new StringBuilder(Environment.NewLine); 293 StringBuilder sb = new StringBuilder(Environment.NewLine);
293 sb.Append("ASSET STATISTICS"); 294// sb.Append("ASSET STATISTICS");
294 sb.Append(Environment.NewLine); 295// sb.Append(Environment.NewLine);
295 296
296 /* 297 /*
297 sb.Append( 298 sb.Append(
@@ -307,7 +308,8 @@ Asset service request failures: {6}"+ Environment.NewLine,
307 BlockedMissingTextureRequests, 308 BlockedMissingTextureRequests,
308 AssetServiceRequestFailures)); 309 AssetServiceRequestFailures));
309 */ 310 */
310 311
312 /*
311 sb.Append( 313 sb.Append(
312 string.Format( 314 string.Format(
313@"Asset cache contains {0,6} assets 315@"Asset cache contains {0,6} assets
@@ -318,7 +320,7 @@ Asset service request failures: {3}" + Environment.NewLine,
318 assetRequestTimeAfterCacheMiss.Milliseconds / 1000.0, 320 assetRequestTimeAfterCacheMiss.Milliseconds / 1000.0,
319 BlockedMissingTextureRequests, 321 BlockedMissingTextureRequests,
320 AssetServiceRequestFailures)); 322 AssetServiceRequestFailures));
321 323 */
322 324
323 sb.Append(Environment.NewLine); 325 sb.Append(Environment.NewLine);
324 sb.Append("CONNECTION STATISTICS"); 326 sb.Append("CONNECTION STATISTICS");
@@ -328,13 +330,13 @@ Asset service request failures: {3}" + Environment.NewLine,
328 "Abnormal client thread terminations: {0}" + Environment.NewLine, 330 "Abnormal client thread terminations: {0}" + Environment.NewLine,
329 abnormalClientThreadTerminations)); 331 abnormalClientThreadTerminations));
330 332
331 sb.Append(Environment.NewLine); 333// sb.Append(Environment.NewLine);
332 sb.Append("INVENTORY STATISTICS"); 334// sb.Append("INVENTORY STATISTICS");
333 sb.Append(Environment.NewLine); 335// sb.Append(Environment.NewLine);
334 sb.Append( 336// sb.Append(
335 string.Format( 337// string.Format(
336 "Initial inventory caching failures: {0}" + Environment.NewLine, 338// "Initial inventory caching failures: {0}" + Environment.NewLine,
337 InventoryServiceRetrievalFailures)); 339// InventoryServiceRetrievalFailures));
338 340
339 sb.Append(Environment.NewLine); 341 sb.Append(Environment.NewLine);
340 sb.Append("FRAME STATISTICS"); 342 sb.Append("FRAME STATISTICS");
@@ -390,17 +392,17 @@ Asset service request failures: {3}" + Environment.NewLine,
390 public override string XReport(string uptime, string version) 392 public override string XReport(string uptime, string version)
391 { 393 {
392 OSDMap args = new OSDMap(30); 394 OSDMap args = new OSDMap(30);
393 args["AssetsInCache"] = OSD.FromString (String.Format ("{0:0.##}", AssetsInCache)); 395// args["AssetsInCache"] = OSD.FromString (String.Format ("{0:0.##}", AssetsInCache));
394 args["TimeAfterCacheMiss"] = OSD.FromString (String.Format ("{0:0.##}", 396// args["TimeAfterCacheMiss"] = OSD.FromString (String.Format ("{0:0.##}",
395 assetRequestTimeAfterCacheMiss.Milliseconds / 1000.0)); 397// assetRequestTimeAfterCacheMiss.Milliseconds / 1000.0));
396 args["BlockedMissingTextureRequests"] = OSD.FromString (String.Format ("{0:0.##}", 398// args["BlockedMissingTextureRequests"] = OSD.FromString (String.Format ("{0:0.##}",
397 BlockedMissingTextureRequests)); 399// BlockedMissingTextureRequests));
398 args["AssetServiceRequestFailures"] = OSD.FromString (String.Format ("{0:0.##}", 400// args["AssetServiceRequestFailures"] = OSD.FromString (String.Format ("{0:0.##}",
399 AssetServiceRequestFailures)); 401// AssetServiceRequestFailures));
400 args["abnormalClientThreadTerminations"] = OSD.FromString (String.Format ("{0:0.##}", 402// args["abnormalClientThreadTerminations"] = OSD.FromString (String.Format ("{0:0.##}",
401 abnormalClientThreadTerminations)); 403// abnormalClientThreadTerminations));
402 args["InventoryServiceRetrievalFailures"] = OSD.FromString (String.Format ("{0:0.##}", 404// args["InventoryServiceRetrievalFailures"] = OSD.FromString (String.Format ("{0:0.##}",
403 InventoryServiceRetrievalFailures)); 405// InventoryServiceRetrievalFailures));
404 args["Dilatn"] = OSD.FromString (String.Format ("{0:0.##}", timeDilation)); 406 args["Dilatn"] = OSD.FromString (String.Format ("{0:0.##}", timeDilation));
405 args["SimFPS"] = OSD.FromString (String.Format ("{0:0.##}", simFps)); 407 args["SimFPS"] = OSD.FromString (String.Format ("{0:0.##}", simFps));
406 args["PhyFPS"] = OSD.FromString (String.Format ("{0:0.##}", physicsFps)); 408 args["PhyFPS"] = OSD.FromString (String.Format ("{0:0.##}", physicsFps));