summaryrefslogtreecommitdiff
path: root/indra/newview/llmeshrepository.cpp
diff options
context:
space:
mode:
authorCallum Prentice <callum@lindenlab.com>2021-03-26 11:47:41 -0700
committerCallum Prentice <callum@lindenlab.com>2021-03-26 11:47:41 -0700
commit9f95e619c9802bd405db43afa3fbf6b5ad82799d (patch)
tree81d9119b151279bccfa3356c4fa39dc50cf6f604 /indra/newview/llmeshrepository.cpp
parentd039580d0736004af642f4620b5f40e1f762a24a (diff)
Add some logging for QA purposes (based on INFO/Mesh tag) to display when the mesh header and the mesh body is retrieved from the simulator or the local cache.
Diffstat (limited to 'indra/newview/llmeshrepository.cpp')
-rw-r--r--indra/newview/llmeshrepository.cpp20
1 files changed, 19 insertions, 1 deletions
diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp
index c2404a7e67..a93b3b4bfd 100644
--- a/indra/newview/llmeshrepository.cpp
+++ b/indra/newview/llmeshrepository.cpp
@@ -1647,6 +1647,10 @@ bool LLMeshRepoThread::fetchMeshHeader(const LLVolumeParams& mesh_params, bool c
file.read(buffer, bytes);
if (headerReceived(mesh_params, buffer, bytes) == MESH_OK)
{
+ std::string mid;
+ mesh_params.getSculptID().toString(mid);
+ LL_INFOS(LOG_MESH) << "Mesh/Cache: Mesh header for ID " << mid << " - was retrieved from the cache." << LL_ENDL;
+
// Found mesh in cache
return true;
}
@@ -1658,8 +1662,13 @@ bool LLMeshRepoThread::fetchMeshHeader(const LLVolumeParams& mesh_params, bool c
std::string http_url;
constructUrl(mesh_params.getSculptID(), &http_url);
+
if (!http_url.empty())
{
+ std::string mid;
+ mesh_params.getSculptID().toString(mid);
+ LL_INFOS(LOG_MESH) << "Mesh/Cache: Mesh header for ID " << mid << " - was retrieved from the simulator." << LL_ENDL;
+
//grab first 4KB if we're going to bother with a fetch. Cache will prevent future fetches if a full mesh fits
//within the first 4KB
//NOTE -- this will break of headers ever exceed 4KB
@@ -1740,6 +1749,11 @@ bool LLMeshRepoThread::fetchMeshLOD(const LLVolumeParams& mesh_params, S32 lod,
if (lodReceived(mesh_params, lod, buffer, size) == MESH_OK)
{
delete[] buffer;
+
+ std::string mid;
+ mesh_id.toString(mid);
+ LL_INFOS(LOG_MESH) << "Mesh/Cache: Mesh body for ID " << mid << " - was retrieved from the cache." << LL_ENDL;
+
return true;
}
}
@@ -1750,9 +1764,13 @@ bool LLMeshRepoThread::fetchMeshLOD(const LLVolumeParams& mesh_params, S32 lod,
//reading from cache failed for whatever reason, fetch from sim
std::string http_url;
constructUrl(mesh_id, &http_url);
-
+
if (!http_url.empty())
{
+ std::string mid;
+ mesh_id.toString(mid);
+ LL_INFOS(LOG_MESH) << "Mesh/Cache: Mesh body for ID " << mid << " - was retrieved from the simulator." << LL_ENDL;
+
LLMeshHandlerBase::ptr_t handler(new LLMeshLODHandler(mesh_params, lod, offset, size));
LLCore::HttpHandle handle = getByteRange(http_url, offset, size, handler);
if (LLCORE_HTTP_HANDLE_INVALID == handle)