leslie_linden avatar leslie_linden committed b0b5dc6

* Added timers to track the http transactions, visible through the same
"InventoryOutboxLogging" debug flag.

Comments (0)

Files changed (1)

indra/newview/llmarketplacefunctions.cpp

 
 #include "llagent.h"
 #include "llhttpclient.h"
+#include "lltimer.h"
 #include "lltrans.h"
 #include "llviewercontrol.h"
 #include "llviewermedia.h"
 	static U32 sImportResultStatus = 0;
 	static LLSD sImportResults = LLSD::emptyMap();
 
+	static LLTimer slmGetTimer;
+	static LLTimer slmPostTimer;
+
 	// Responders
 	
 	class LLImportPostResponder : public LLHTTPClient::Responder
 		
 		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) ||
 		
 		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) ||
 			llinfos << " SLM GET: " << url << llendl;
 		}
 
+		slmGetTimer.start();
 		LLHTTPClient::get(url, new LLImportGetResponder(), LLViewerMedia::getHeaders());
 		
 		return true;
 			llinfos << " SLM GET: " << url << llendl;
 		}
 
+		slmGetTimer.start();
 		LLHTTPClient::get(url, new LLImportGetResponder(), headers);
 		
 		return true;
 			llinfos << " SLM POST: " << url << llendl;
 		}
 
+		slmPostTimer.start();
 		LLHTTPClient::post(url, LLSD(), new LLImportPostResponder(), headers);
 		
 		return true;
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.