aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework
diff options
context:
space:
mode:
authorlbsa712008-02-09 21:50:45 +0000
committerlbsa712008-02-09 21:50:45 +0000
commit0b0bb28fd50bd749deed842fdf7e07e12f5b4e54 (patch)
tree7c941ac08144457e796278de9b2018ae87704bea /OpenSim/Framework
parent* Added count of temporary assets (diff)
downloadopensim-SC-0b0bb28fd50bd749deed842fdf7e07e12f5b4e54.zip
opensim-SC-0b0bb28fd50bd749deed842fdf7e07e12f5b4e54.tar.gz
opensim-SC-0b0bb28fd50bd749deed842fdf7e07e12f5b4e54.tar.bz2
opensim-SC-0b0bb28fd50bd749deed842fdf7e07e12f5b4e54.tar.xz
* added count of texture data bytes and asset bytes
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r--OpenSim/Framework/Communications/Cache/AssetCache.cs24
1 files changed, 18 insertions, 6 deletions
diff --git a/OpenSim/Framework/Communications/Cache/AssetCache.cs b/OpenSim/Framework/Communications/Cache/AssetCache.cs
index 9435c3d..3e60ceb 100644
--- a/OpenSim/Framework/Communications/Cache/AssetCache.cs
+++ b/OpenSim/Framework/Communications/Cache/AssetCache.cs
@@ -73,17 +73,22 @@ namespace OpenSim.Framework.Communications.Cache
73 TextureRequests.Count, 73 TextureRequests.Count,
74 RequestedAssets.Count, 74 RequestedAssets.Count,
75 RequestedTextures.Count, 75 RequestedTextures.Count,
76 RequestLists.Count ); 76 RequestLists.Count);
77 77
78 int temporaryImages = 0; 78 int temporaryImages = 0;
79 int temporaryAssets = 0; 79 int temporaryAssets = 0;
80 80
81 long imageBytes = 0;
82 long assetBytes = 0;
83
81 foreach (TextureImage texture in Textures.Values) 84 foreach (TextureImage texture in Textures.Values)
82 { 85 {
83 if(texture.Temporary) 86 if (texture.Temporary)
84 { 87 {
85 temporaryImages++; 88 temporaryImages++;
86 } 89 }
90
91 imageBytes += texture.Data.GetLongLength(0);
87 } 92 }
88 93
89 foreach (AssetInfo asset in Assets.Values) 94 foreach (AssetInfo asset in Assets.Values)
@@ -92,11 +97,18 @@ namespace OpenSim.Framework.Communications.Cache
92 { 97 {
93 temporaryAssets++; 98 temporaryAssets++;
94 } 99 }
100
101 assetBytes += asset.Data.GetLongLength(0);
95 } 102 }
96 103
97 m_log.InfoFormat("Temporary Images:{0} Temporary Assets:{1}", 104 m_log.InfoFormat("Temporary Images: {0} Temporary Assets: {1}",
98 temporaryImages, 105 temporaryImages,
99 temporaryAssets ); 106 temporaryAssets);
107
108 m_log.InfoFormat("Image data: {0}kb Asset data: {1}kb",
109 imageBytes/1024,
110 assetBytes/1024);
111
100 } 112 }
101 113
102 public void Clear() 114 public void Clear()
@@ -126,7 +138,7 @@ namespace OpenSim.Framework.Communications.Cache
126 m_assetServer = assetServer; 138 m_assetServer = assetServer;
127 m_assetServer.SetReceiver(this); 139 m_assetServer.SetReceiver(this);
128 140
129 141
130 m_assetCacheThread = new Thread(new ThreadStart(RunAssetManager)); 142 m_assetCacheThread = new Thread(new ThreadStart(RunAssetManager));
131 m_assetCacheThread.IsBackground = true; 143 m_assetCacheThread.IsBackground = true;
132 m_assetCacheThread.Start(); 144 m_assetCacheThread.Start();