diff options
| author | Leslie Linden <leslie@lindenlab.com> | 2012-02-10 10:56:55 -0800 | 
|---|---|---|
| committer | Leslie Linden <leslie@lindenlab.com> | 2012-02-10 10:56:55 -0800 | 
| commit | 788343db01ed4f6c0e786745d4f01bf6f5d2dba5 (patch) | |
| tree | 9233a122042b992a09a12a88479b349d2c5a94f4 /indra/newview | |
| parent | 94b8cd3fa602025e59f4395dc971c8ffa1ac86c5 (diff) | |
* Added timers to track the http transactions, visible through the same
  "InventoryOutboxLogging" debug flag.
Diffstat (limited to 'indra/newview')
| -rw-r--r-- | indra/newview/llmarketplacefunctions.cpp | 15 | 
1 files changed, 15 insertions, 0 deletions
| diff --git a/indra/newview/llmarketplacefunctions.cpp b/indra/newview/llmarketplacefunctions.cpp index a3f0a6062c..93dd82957f 100644 --- a/indra/newview/llmarketplacefunctions.cpp +++ b/indra/newview/llmarketplacefunctions.cpp @@ -30,6 +30,7 @@  #include "llagent.h"  #include "llhttpclient.h" +#include "lltimer.h"  #include "lltrans.h"  #include "llviewercontrol.h"  #include "llviewermedia.h" @@ -115,6 +116,9 @@ namespace LLMarketplaceImport  	static U32 sImportResultStatus = 0;  	static LLSD sImportResults = LLSD::emptyMap(); +	static LLTimer slmGetTimer; +	static LLTimer slmPostTimer; +  	// Responders  	class LLImportPostResponder : public LLHTTPClient::Responder @@ -124,11 +128,15 @@ namespace LLMarketplaceImport  		void completed(U32 status, const std::string& reason, const LLSD& content)  		{ +			slmPostTimer.stop(); +  			if (gSavedSettings.getBOOL("InventoryOutboxLogging"))  			{  				llinfos << " SLM POST status: " << status << llendl;  				llinfos << " SLM POST reason: " << reason << llendl;  				llinfos << " SLM POST content: " << content.asString() << llendl; + +				llinfos << " SLM POST timer: " << slmPostTimer.getElapsedTimeF32() << llendl;  			}  			if ((status == MarketplaceErrorCodes::IMPORT_REDIRECT) || @@ -167,11 +175,15 @@ namespace LLMarketplaceImport  		void completed(U32 status, const std::string& reason, const LLSD& content)  		{ +			slmGetTimer.stop(); +  			if (gSavedSettings.getBOOL("InventoryOutboxLogging"))  			{  				llinfos << " SLM GET status: " << status << llendl;  				llinfos << " SLM GET reason: " << reason << llendl;  				llinfos << " SLM GET content: " << content.asString() << llendl; + +				llinfos << " SLM GET timer: " << slmGetTimer.getElapsedTimeF32() << llendl;  			}  			if ((status == MarketplaceErrorCodes::IMPORT_AUTHENTICATION_ERROR) || @@ -247,6 +259,7 @@ namespace LLMarketplaceImport  			llinfos << " SLM GET: " << url << llendl;  		} +		slmGetTimer.start();  		LLHTTPClient::get(url, new LLImportGetResponder(), LLViewerMedia::getHeaders());  		return true; @@ -277,6 +290,7 @@ namespace LLMarketplaceImport  			llinfos << " SLM GET: " << url << llendl;  		} +		slmGetTimer.start();  		LLHTTPClient::get(url, new LLImportGetResponder(), headers);  		return true; @@ -310,6 +324,7 @@ namespace LLMarketplaceImport  			llinfos << " SLM POST: " << url << llendl;  		} +		slmPostTimer.start();  		LLHTTPClient::post(url, LLSD(), new LLImportPostResponder(), headers);  		return true; | 
