summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerstats.cpp
diff options
context:
space:
mode:
authorMnikolenko Productengine <mnikolenko@productengine.com>2021-04-29 17:38:15 +0300
committerMnikolenko Productengine <mnikolenko@productengine.com>2021-04-29 17:38:15 +0300
commitc8977fd904df10f225915ac5527d279440356257 (patch)
tree1701da8b3680bf6a65cab2dbe9edf6d620ff74be /indra/newview/llviewerstats.cpp
parent39503419163aff0cb1cd305de924f4edc68833b0 (diff)
SL-15177 Fix the way of counting for gTextureTimer
Diffstat (limited to 'indra/newview/llviewerstats.cpp')
-rw-r--r--indra/newview/llviewerstats.cpp23
1 files changed, 14 insertions, 9 deletions
diff --git a/indra/newview/llviewerstats.cpp b/indra/newview/llviewerstats.cpp
index 05f88b0a75..0380bb47fc 100644
--- a/indra/newview/llviewerstats.cpp
+++ b/indra/newview/llviewerstats.cpp
@@ -206,6 +206,7 @@ LLTrace::EventStatHandle<F64Seconds > AVATAR_EDIT_TIME("avataredittime", "Second
LLTrace::EventStatHandle<LLUnit<F32, LLUnits::Percent> > OBJECT_CACHE_HIT_RATE("object_cache_hits");
+LLTrace::EventStatHandle<F64Seconds > TEXTURE_FETCH_TIME("texture_fetch_time");
}
LLViewerStats::LLViewerStats()
@@ -387,15 +388,6 @@ void update_statistics()
add(LLStatViewer::ASSET_UDP_DATA_RECEIVED, F64Bits(gTransferManager.getTransferBitsIn(LLTCT_ASSET)));
gTransferManager.resetTransferBitsIn(LLTCT_ASSET);
- if (LLAppViewer::getTextureFetch()->getNumRequests() == 0)
- {
- gTextureTimer.pause();
- }
- else
- {
- gTextureTimer.unpause();
- }
-
sample(LLStatViewer::VISIBLE_AVATARS, LLVOAvatar::sNumVisibleAvatars);
LLWorld::getInstance()->updateNetStats();
LLWorld::getInstance()->requestCacheMisses();
@@ -417,6 +409,19 @@ void update_statistics()
}
}
+void update_texture_time()
+{
+ if (gTextureList.isPrioRequestsFetched())
+ {
+ gTextureTimer.pause();
+ }
+ else
+ {
+ gTextureTimer.unpause();
+ }
+
+ record(LLStatViewer::TEXTURE_FETCH_TIME, gTextureTimer.getElapsedTimeF32());
+}
/*
* The sim-side LLSD is in newsim/llagentinfo.cpp:forwardViewerStats.
*