Exemple #1
0
//        public void AddAsset(AssetBase asset)
//        {
//            assetsInCache++;
//            //assetCacheMemoryUsage += asset.Data.Length;
//        }
//
//        public void RemoveAsset(UUID uuid)
//        {
//            assetsInCache--;
//        }
//
//        public void AddTexture(AssetBase image)
//        {
//            if (image.Data != null)
//            {
//                texturesInCache++;
//
//                // This could have been a pull stat, though there was originally a nebulous idea to measure flow rates
//                textureCacheMemoryUsage += image.Data.Length;
//            }
//        }
//
//        /// <summary>
//        /// Signal that the asset cache has been cleared.
//        /// </summary>
//        public void ClearAssetCacheStatistics()
//        {
//            assetsInCache = 0;
//            assetCacheMemoryUsage = 0;
//            texturesInCache = 0;
//            textureCacheMemoryUsage = 0;
//        }
//
//        public void AddAssetRequestTimeAfterCacheMiss(TimeSpan ts)
//        {
//            assetRequestTimeAfterCacheMiss = ts;
//        }
//
//        public void AddBlockedMissingTextureRequest()
//        {
//            blockedMissingTextureRequests++;
//        }
//
//        public void AddAssetServiceRequestFailure()
//        {
//            assetServiceRequestFailures++;
//        }

//        public void AddInventoryServiceRetrievalFailure()
//        {
//            inventoryServiceRetrievalFailures++;
//        }

        public void AddAgent(string name, string ipAddress, string timestamp)
        {
            // Save new agent data to the list of connected agents
            AgentSimData agentSimData = new AgentSimData(name, ipAddress, timestamp);

            agentList.Add(agentSimData);
        }
//        public void AddAsset(AssetBase asset)
//        {
//            assetsInCache++;
//            //assetCacheMemoryUsage += asset.Data.Length;
//        }
//        
//        public void RemoveAsset(UUID uuid)
//        {
//            assetsInCache--;
//        }
//
//        public void AddTexture(AssetBase image)
//        {
//            if (image.Data != null)
//            {
//                texturesInCache++;
//
//                // This could have been a pull stat, though there was originally a nebulous idea to measure flow rates
//                textureCacheMemoryUsage += image.Data.Length;
//            }
//        }
//
//        /// <summary>
//        /// Signal that the asset cache has been cleared.
//        /// </summary>
//        public void ClearAssetCacheStatistics()
//        {
//            assetsInCache = 0;
//            assetCacheMemoryUsage = 0;
//            texturesInCache = 0;
//            textureCacheMemoryUsage = 0;
//        }
//        
//        public void AddAssetRequestTimeAfterCacheMiss(TimeSpan ts)
//        {
//            assetRequestTimeAfterCacheMiss = ts;
//        }
//
//        public void AddBlockedMissingTextureRequest()
//        {
//            blockedMissingTextureRequests++;
//        }
//
//        public void AddAssetServiceRequestFailure()
//        {
//            assetServiceRequestFailures++;
//        }

//        public void AddInventoryServiceRetrievalFailure()
//        {
//            inventoryServiceRetrievalFailures++;
//        }

        public void AddAgent(string name, string ipAddress, string timestamp)
        {
            // Save new agent data to the list of connected agents
            AgentSimData agentSimData = new AgentSimData(name, ipAddress, timestamp);
            agentList.Add(agentSimData);
        }