From 788343db01ed4f6c0e786745d4f01bf6f5d2dba5 Mon Sep 17 00:00:00 2001 From: Leslie Linden Date: Fri, 10 Feb 2012 10:56:55 -0800 Subject: * Added timers to track the http transactions, visible through the same "InventoryOutboxLogging" debug flag. --- indra/newview/llmarketplacefunctions.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'indra/newview/llmarketplacefunctions.cpp') 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; -- cgit v1.2.3