diff options
author | Monty Brandenberg <monty@lindenlab.com> | 2010-11-23 12:29:15 -0800 |
---|---|---|
committer | Monty Brandenberg <monty@lindenlab.com> | 2010-11-23 12:29:15 -0800 |
commit | 3962b155b4939f831dfd82701d46c4f15aa9f7ac (patch) | |
tree | cd271b10f059f15b2fbbfe8cecb7de2cde4f7618 /indra/newview/lltexturefetch.h | |
parent | 9ec3334184c71879c2f8bd0f27095b71c4302559 (diff) |
ESC-154 ESC-156 Integrating metrics collector into viewer.
After discussions, renamed 'QAModeMetricsSubmetrics' to 'QAModeMetrics'
and confirmed that LLCachedControl<> is the way to go. Moved the
resulting flag out of LLViewerAssetStats (where it didn't belong)
and it lives in both LLAppViewer and LLTextureFetch where it does
belong.
Diffstat (limited to 'indra/newview/lltexturefetch.h')
-rw-r--r-- | indra/newview/lltexturefetch.h | 36 |
1 files changed, 33 insertions, 3 deletions
diff --git a/indra/newview/lltexturefetch.h b/indra/newview/lltexturefetch.h index 88b7e4a16b..d46d2da7bc 100644 --- a/indra/newview/lltexturefetch.h +++ b/indra/newview/lltexturefetch.h @@ -49,7 +49,7 @@ class LLTextureFetch : public LLWorkerThread friend class HTTPGetResponder; public: - LLTextureFetch(LLTextureCache* cache, LLImageDecodeThread* imagedecodethread, bool threaded); + LLTextureFetch(LLTextureCache* cache, LLImageDecodeThread* imagedecodethread, bool threaded, bool qa_mode); ~LLTextureFetch(); /*virtual*/ S32 update(U32 max_time_ms); @@ -90,8 +90,10 @@ public: void commandSendMetrics(const std::string & caps_url, LLSD * report_main); void commandDataBreak(); - LLCurlRequest & getCurlRequest() { return *mCurlGetRequest; } - + LLCurlRequest & getCurlRequest() { return *mCurlGetRequest; } + + bool isQAMode() const { return mQAMode; } + protected: void addToNetworkQueue(LLTextureFetchWorker* worker); void removeFromNetworkQueue(LLTextureFetchWorker* worker, bool cancel); @@ -109,8 +111,33 @@ private: /*virtual*/ void threadedUpdate(void); // Metrics command helpers + /** + * Enqueues a command request at the end of the command queue + * and wakes up the thread as needed. + * + * Takes ownership of the TFRequest object. + * + * Method locks the command queue. + */ void cmdEnqueue(TFRequest *); + + /** + * Returns the first TFRequest object in the command queue or + * NULL if none is present. + * + * Caller acquires ownership of the object and must dispose of it. + * + * Method locks the command queue. + */ TFRequest * cmdDequeue(); + + /** + * Processes the first command in the queue disposing of the + * request on completion. Successive calls are needed to perform + * additional commands. + * + * Method locks the command queue. + */ void cmdDoWork(); public: @@ -151,6 +178,9 @@ private: typedef std::vector<TFRequest *> command_queue_t; command_queue_t mCommands; + // If true, modifies some behaviors that help with QA tasks. + const bool mQAMode; + public: // A probabilistically-correct indicator that the current // attempt to log metrics follows a break in the metrics stream |