summaryrefslogtreecommitdiff
path: root/indra/newview/llmeshrepository.cpp
diff options
context:
space:
mode:
authorMonty Brandenberg <monty@lindenlab.com>2013-04-12 20:11:17 +0000
committerMonty Brandenberg <monty@lindenlab.com>2013-04-12 20:11:17 +0000
commit1310630ac60ba292f52761e795eaa55610818b9b (patch)
tree4befed675a777d0512c0f34f05d42feb7aa89f89 /indra/newview/llmeshrepository.cpp
parent6536fe24049248a84447f1f06570f1be1dd24ef9 (diff)
SH-4090 [WIP] Basic deadman timer integration started on Linux. Moving to windows
to do real work.
Diffstat (limited to 'indra/newview/llmeshrepository.cpp')
-rwxr-xr-xindra/newview/llmeshrepository.cpp45
1 files changed, 43 insertions, 2 deletions
diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp
index 1223615079..11c5780a30 100755
--- a/indra/newview/llmeshrepository.cpp
+++ b/indra/newview/llmeshrepository.cpp
@@ -37,6 +37,7 @@
#include "llcallbacklist.h"
#include "llcurl.h"
#include "lldatapacker.h"
+#include "lldeadmantimer.h"
#include "llfloatermodelpreview.h"
#include "llfloaterperms.h"
#include "lleconomy.h"
@@ -94,8 +95,9 @@ U32 LLMeshRepository::sLODPending = 0;
U32 LLMeshRepository::sCacheBytesRead = 0;
U32 LLMeshRepository::sCacheBytesWritten = 0;
U32 LLMeshRepository::sPeakKbps = 0;
-
+LLDeadmanTimer LLMeshRepository::sQuiescentTimer(15.0);
+
const U32 MAX_TEXTURE_UPLOAD_RETRIES = 5;
static S32 dump_num = 0;
@@ -115,7 +117,6 @@ std::string header_lod[] =
"high_lod"
};
-
//get the number of bytes resident in memory for given volume
U32 get_volume_memory_size(const LLVolume* volume)
{
@@ -2678,6 +2679,9 @@ void LLMeshRepository::notifyDecompositionReceived(LLModel::Decomposition* decom
void LLMeshRepository::notifyMeshLoaded(const LLVolumeParams& mesh_params, LLVolume* volume)
{ //called from main thread
+ // Manage time-to-load metrics for mesh download operations.
+ metricsCheck();
+
S32 detail = LLVolumeLODGroup::getVolumeDetailFromScale(volume->getDetail());
//get list of objects waiting to be notified this mesh is loaded
@@ -3699,3 +3703,40 @@ bool LLMeshRepository::meshRezEnabled()
}
return false;
}
+
+void LLMeshRepository::metricsStart()
+{
+ sQuiescentTimer.start();
+}
+
+void LLMeshRepository::metricsStop()
+{
+ sQuiescentTimer.stop();
+}
+
+void LLMeshRepository::metricsCheck()
+{
+ static bool first_start(true);
+ F64 started, stopped;
+ U64 count;
+
+ if (first_start)
+ {
+ // Let the first request start the timing cycle for login.
+ metricsStart();
+ first_start = false;
+ }
+ sQuiescentTimer.ringBell();
+ if (sQuiescentTimer.isExpired(started, stopped, count))
+ {
+ LLSD metrics;
+
+ metrics["reason"] = "Mesh download quiescent";
+ metrics["scope"] = "Login";
+ metrics["start"] = started;
+ metrics["stop"] = stopped;
+ metrics["downloads"] = LLSD::Integer(count);
+ llinfos << "MetricsMarker" << metrics << llendl;
+ }
+}
+