summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2012-03-19 16:31:58 -0400
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2012-03-19 16:31:58 -0400
commit3215c6c4ca9553abc1cb8097f2466a409b37af24 (patch)
tree89da272ba4425bee545626a77e58c28606337925 /indra/newview
parent6a96c95ee6dda0ffeb3ee1b93b4b02ea2156b076 (diff)
parente6a206f8457facbaa441c46216529d2291b7930f (diff)
merge viewer-thx-runway-shared-1 to runway
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llagentlistener.cpp11
-rw-r--r--indra/newview/llnearbychatbar.cpp2
-rw-r--r--indra/newview/llnearbychatbar.h4
-rwxr-xr-xindra/newview/lltexturefetch.cpp17
-rw-r--r--indra/newview/lltexturefetch.h3
-rw-r--r--indra/newview/llviewerobjectlist.cpp5
-rw-r--r--indra/newview/llviewerobjectlist.h2
-rw-r--r--indra/newview/skins/default/xui/en/floater_stats.xml41
8 files changed, 82 insertions, 3 deletions
diff --git a/indra/newview/llagentlistener.cpp b/indra/newview/llagentlistener.cpp
index a8d2222c03..a4c0b056ac 100644
--- a/indra/newview/llagentlistener.cpp
+++ b/indra/newview/llagentlistener.cpp
@@ -126,6 +126,17 @@ LLAgentListener::LLAgentListener(LLAgent &agent)
"[\"obj_uuid\"]: id of object to look at, use this or [\"position\"] to indicate the target\n"
"[\"position\"]: region position {x, y, z} where to find closest object or avatar to look at",
&LLAgentListener::lookAt);
+ add("getGroups",
+ "Send information about the agent's groups on [\"reply\"]:\n"
+ "[\"groups\"]: array of group information\n"
+ "[\"id\"]: group id\n"
+ "[\"name\"]: group name\n"
+ "[\"insignia\"]: group insignia texture id\n"
+ "[\"notices\"]: boolean indicating if this user accepts notices from this group\n"
+ "[\"display\"]: boolean indicating if this group is listed in the user's profile\n"
+ "[\"contrib\"]: user's land contribution to this group\n",
+ &LLAgentListener::getGroups,
+ LLSDMap("reply", LLSD()));
}
void LLAgentListener::requestTeleport(LLSD const & event_data) const
diff --git a/indra/newview/llnearbychatbar.cpp b/indra/newview/llnearbychatbar.cpp
index 4512c14b7a..78f1fd583e 100644
--- a/indra/newview/llnearbychatbar.cpp
+++ b/indra/newview/llnearbychatbar.cpp
@@ -34,6 +34,7 @@
#include "llfirstuse.h"
#include "llnearbychatbar.h"
+#include "llnearbychatbarlistener.h"
#include "llagent.h"
#include "llgesturemgr.h"
#include "llmultigesture.h"
@@ -80,6 +81,7 @@ LLNearbyChatBar::LLNearbyChatBar(const LLSD& key)
mExpandedHeight(COLLAPSED_HEIGHT + EXPANDED_HEIGHT)
{
mSpeakerMgr = LLLocalSpeakerMgr::getInstance();
+ mListener.reset(new LLNearbyChatBarListener(*this));
}
//virtual
diff --git a/indra/newview/llnearbychatbar.h b/indra/newview/llnearbychatbar.h
index baf12a06ea..bb07c60154 100644
--- a/indra/newview/llnearbychatbar.h
+++ b/indra/newview/llnearbychatbar.h
@@ -35,6 +35,8 @@
#include "lloutputmonitorctrl.h"
#include "llspeakers.h"
+class LLNearbyChatBarListener;
+
class LLNearbyChatBar : public LLFloater
{
public:
@@ -92,6 +94,8 @@ protected:
LLLocalSpeakerMgr* mSpeakerMgr;
S32 mExpandedHeight;
+
+ boost::shared_ptr<LLNearbyChatBarListener> mListener;
};
#endif
diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp
index dc76131c91..e27ebf9018 100755
--- a/indra/newview/lltexturefetch.cpp
+++ b/indra/newview/lltexturefetch.cpp
@@ -54,6 +54,9 @@
#include "llworld.h"
#include "llsdutil.h"
+LLStat LLTextureFetch::sCacheHitRate("texture_cache_hits", 128);
+LLStat LLTextureFetch::sCacheReadLatency("texture_cache_read_latency", 128);
+
//////////////////////////////////////////////////////////////////////////////
class LLTextureFetchWorker : public LLWorkerClass
{
@@ -243,6 +246,8 @@ private:
S32 mDecodedDiscard;
LLFrameTimer mRequestedTimer;
LLFrameTimer mFetchTimer;
+ LLTimer mCacheReadTimer;
+ F32 mCacheReadTime;
LLTextureCache::handle_t mCacheReadHandle;
LLTextureCache::handle_t mCacheWriteHandle;
U8* mBuffer;
@@ -654,6 +659,7 @@ LLTextureFetchWorker::LLTextureFetchWorker(LLTextureFetch* fetcher,
mRequestedDiscard(-1),
mLoadedDiscard(-1),
mDecodedDiscard(-1),
+ mCacheReadTime(0.f),
mCacheReadHandle(LLTextureCache::nullHandle()),
mCacheWriteHandle(LLTextureCache::nullHandle()),
mBuffer(NULL),
@@ -927,6 +933,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
CacheReadResponder* responder = new CacheReadResponder(mFetcher, mID, mFormattedImage);
mCacheReadHandle = mFetcher->mTextureCache->readFromCache(filename, mID, cache_priority,
offset, size, responder);
+ mCacheReadTimer.reset();
}
else if (mUrl.empty())
{
@@ -935,6 +942,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
CacheReadResponder* responder = new CacheReadResponder(mFetcher, mID, mFormattedImage);
mCacheReadHandle = mFetcher->mTextureCache->readFromCache(mID, cache_priority,
offset, size, responder);
+ mCacheReadTimer.reset();
}
else if(mCanUseHTTP)
{
@@ -987,7 +995,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
LL_DEBUGS("Texture") << mID << ": Cached. Bytes: " << mFormattedImage->getDataSize()
<< " Size: " << llformat("%dx%d",mFormattedImage->getWidth(),mFormattedImage->getHeight())
<< " Desired Discard: " << mDesiredDiscard << " Desired Size: " << mDesiredSize << LL_ENDL;
- // fall through
+ LLTextureFetch::sCacheHitRate.addValue(100.f);
}
else
{
@@ -1003,6 +1011,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
mState = LOAD_FROM_NETWORK;
}
// fall through
+ LLTextureFetch::sCacheHitRate.addValue(0.f);
}
}
@@ -1781,6 +1790,7 @@ void LLTextureFetchWorker::callbackDecoded(bool success, LLImageRaw* raw, LLImag
mDecoded = TRUE;
// llinfos << mID << " : DECODE COMPLETE " << llendl;
setPriority(LLWorkerThread::PRIORITY_HIGH | mWorkPriority);
+ mCacheReadTime = mCacheReadTimer.getElapsedTimeF32();
}
//////////////////////////////////////////////////////////////////////////////
@@ -2093,6 +2103,11 @@ bool LLTextureFetch::getRequestFinished(const LLUUID& id, S32& discard_level,
discard_level = worker->mDecodedDiscard;
raw = worker->mRawImage;
aux = worker->mAuxImage;
+ F32 cache_read_time = worker->mCacheReadTime;
+ if (cache_read_time != 0.f)
+ {
+ sCacheReadLatency.addValue(cache_read_time * 1000.f);
+ }
res = true;
LL_DEBUGS("Texture") << id << ": Request Finished. State: " << worker->mState << " Discard: " << discard_level << LL_ENDL;
worker->unlockWorkMutex();
diff --git a/indra/newview/lltexturefetch.h b/indra/newview/lltexturefetch.h
index 35df7d816f..710dd67e99 100644
--- a/indra/newview/lltexturefetch.h
+++ b/indra/newview/lltexturefetch.h
@@ -164,6 +164,9 @@ private:
LLMutex mQueueMutex; //to protect mRequestMap and mCommands only
LLMutex mNetworkQueueMutex; //to protect mNetworkQueue, mHTTPTextureQueue and mCancelQueue.
+ static LLStat sCacheHitRate;
+ static LLStat sCacheReadLatency;
+
LLTextureCache* mTextureCache;
LLImageDecodeThread* mImageDecodeThread;
LLCurlRequest* mCurlGetRequest;
diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp
index 6912faa9ec..54ccfb9aae 100644
--- a/indra/newview/llviewerobjectlist.cpp
+++ b/indra/newview/llviewerobjectlist.cpp
@@ -91,8 +91,9 @@ extern LLPipeline gPipeline;
// Statics for object lookup tables.
U32 LLViewerObjectList::sSimulatorMachineIndex = 1; // Not zero deliberately, to speed up index check.
-std::map<U64, U32> LLViewerObjectList::sIPAndPortToIndex;
+std::map<U64, U32> LLViewerObjectList::sIPAndPortToIndex;
std::map<U64, LLUUID> LLViewerObjectList::sIndexAndLocalIDToUUID;
+LLStat LLViewerObjectList::sCacheHitRate("object_cache_hits", 128);
LLViewerObjectList::LLViewerObjectList()
{
@@ -542,6 +543,8 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys,
}
justCreated = TRUE;
mNumNewObjects++;
+ sCacheHitRate.addValue(cached ? 100.f : 0.f);
+
}
diff --git a/indra/newview/llviewerobjectlist.h b/indra/newview/llviewerobjectlist.h
index c5f2a2c1ee..64925f46ae 100644
--- a/indra/newview/llviewerobjectlist.h
+++ b/indra/newview/llviewerobjectlist.h
@@ -192,6 +192,8 @@ protected:
std::vector<OrphanInfo> mOrphanChildren; // UUID's of orphaned objects
S32 mNumOrphans;
+ static LLStat sCacheHitRate;
+
typedef std::vector<LLPointer<LLViewerObject> > vobj_list_t;
vobj_list_t mObjects;
diff --git a/indra/newview/skins/default/xui/en/floater_stats.xml b/indra/newview/skins/default/xui/en/floater_stats.xml
index 2fd932786b..9400f7b94f 100644
--- a/indra/newview/skins/default/xui/en/floater_stats.xml
+++ b/indra/newview/skins/default/xui/en/floater_stats.xml
@@ -149,13 +149,52 @@
show_per_sec="true"
show_bar="false">
</stat_bar>
+ <stat_bar
+ name="object_cache_hits"
+ label="Object Cache Hit Rate"
+ stat="object_cache_hits"
+ bar_min="0"
+ bar_max="100"
+ unit_label="%"
+ tick_spacing="20"
+ label_spacing="20"
+ show_history="true"
+ show_per_sec="false"
+ show_bar="false">
+ </stat_bar>
</stat_view>
<!--Texture Stats-->
<stat_view
name="texture"
label="Texture"
show_label="true">
- <stat_bar
+ <stat_bar
+ name="texture_cache_hits"
+ label="Cache Hit Rate"
+ stat="texture_cache_hits"
+ bar_min="0.f"
+ bar_max="100.f"
+ unit_label="%"
+ tick_spacing="20"
+ label_spacing="20"
+ show_history="true"
+ show_per_sec="false"
+ show_bar="false">
+ </stat_bar>
+ <stat_bar
+ name="texture_cache_read_latency"
+ label="Cache Read Latency"
+ unit_label="msec"
+ stat="texture_cache_read_latency"
+ bar_min="0.f"
+ bar_max="1000.f"
+ tick_spacing="100"
+ label_spacing="200"
+ show_history="true"
+ show_per_sec="false"
+ show_bar="false">
+ </stat_bar>
+ <stat_bar
name="numimagesstat"
label="Count"
stat="numimagesstat"