summaryrefslogtreecommitdiff
path: root/indra/newview/lltexturefetch.h
diff options
context:
space:
mode:
authorMonty Brandenberg <monty@lindenlab.com>2012-06-18 18:38:24 -0400
committerMonty Brandenberg <monty@lindenlab.com>2012-06-18 18:38:24 -0400
commit1cf8e785bad3562fac23feeb2343cfaec1b971bc (patch)
tree3f382682e67349b66b77db6d14ed9ef7f4be9533 /indra/newview/lltexturefetch.h
parent46662a3010b2c920ae60b4ca246d56e3caee6f6f (diff)
Tidy Texture Console, add cache & resource wait stats, issue stats line to log on exit.
With much trial-and-error, cleaned up the banner on the texture console and made everything mostly fit. Added global cache read, cache write and resource wait count events to the console display to show if cache is working. On clean exit, emit a log line to report stats to log file (intended for automated tests, maybe): LLTextureFetch::endThread: CacheReads: 2618, CacheWrites: 117, ResWaits: 0, TotalHTTPReq: 117
Diffstat (limited to 'indra/newview/lltexturefetch.h')
-rw-r--r--indra/newview/lltexturefetch.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/indra/newview/lltexturefetch.h b/indra/newview/lltexturefetch.h
index 50e3181623..e17c71113a 100644
--- a/indra/newview/lltexturefetch.h
+++ b/indra/newview/lltexturefetch.h
@@ -186,6 +186,17 @@ public:
// Threads: T*
int getHttpWaitersCount();
// ----------------------------------
+ // Stats management
+
+ // Add given counts to the global totals for the states/requests
+ // Threads: T*
+ void updateStateStats(U32 cache_read, U32 cache_write, U32 res_wait);
+
+ // Return the global counts
+ // Threads: T*
+ void getStateStats(U32 * cache_read, U32 * cache_write, U32 * res_wait);
+
+ // ----------------------------------
protected:
// Threads: T* (but Ttf in practice)
@@ -323,6 +334,12 @@ private:
typedef std::set<LLUUID> wait_http_res_queue_t;
wait_http_res_queue_t mHttpWaitResource; // Mfnq
+
+ // Cumulative stats on the states/requests issued by
+ // textures running through here.
+ U32 mTotalCacheReadCount; // Mfq
+ U32 mTotalCacheWriteCount; // Mfq
+ U32 mTotalResourceWaitCount; // Mfq
public:
// A probabilistically-correct indicator that the current