From 57d5744f2c064ccb7bf8dd3dca2a24f6755297ac Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Fri, 28 Jul 2017 14:07:25 -0700 Subject: MAINT-7634: Move StatsAccumulator into llcommon, collect data sent and error codes from core. --- indra/llcorehttp/httprequest.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'indra/llcorehttp/httprequest.cpp') diff --git a/indra/llcorehttp/httprequest.cpp b/indra/llcorehttp/httprequest.cpp index e09f0c3b18..d9662c1232 100644 --- a/indra/llcorehttp/httprequest.cpp +++ b/indra/llcorehttp/httprequest.cpp @@ -37,7 +37,7 @@ #include "_httpopsetget.h" #include "lltimer.h" - +#include "httpstats.h" namespace { @@ -52,6 +52,7 @@ namespace LLCore // ==================================== // HttpRequest Implementation // ==================================== +HttpRequest::Statistics HttpRequest::mStatistics; HttpRequest::HttpRequest() @@ -62,6 +63,12 @@ HttpRequest::HttpRequest() mRequestQueue->addRef(); mReplyQueue.reset( new HttpReplyQueue() ); + + ++mStatistics.mCurrentRequests; + ++mStatistics.mTotalRequests; + + + LL_WARNS("HTTPRequest") << "New HttpRequest created (outstanding: " << mStatistics.mCurrentRequests << " total: " << mStatistics.mTotalRequests << ")" << LL_ENDL; } @@ -74,6 +81,9 @@ HttpRequest::~HttpRequest() } mReplyQueue.reset(); + --mStatistics.mCurrentRequests; + + LL_WARNS("HTTPRequest") << "HttpRequest destroyed (outstanding: " << mStatistics.mCurrentRequests << " total: " << mStatistics.mTotalRequests << ")" << LL_ENDL; } -- cgit v1.2.3 From 1038633526330cf931ba097dbafdd270b5bb56e3 Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Tue, 8 Aug 2017 09:04:32 -0700 Subject: MAINT-7634: Logging and instrumentation canges to narrow down viewer crashes. --- indra/llcorehttp/httprequest.cpp | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'indra/llcorehttp/httprequest.cpp') diff --git a/indra/llcorehttp/httprequest.cpp b/indra/llcorehttp/httprequest.cpp index d9662c1232..2687f77217 100644 --- a/indra/llcorehttp/httprequest.cpp +++ b/indra/llcorehttp/httprequest.cpp @@ -52,7 +52,6 @@ namespace LLCore // ==================================== // HttpRequest Implementation // ==================================== -HttpRequest::Statistics HttpRequest::mStatistics; HttpRequest::HttpRequest() @@ -64,11 +63,7 @@ HttpRequest::HttpRequest() mReplyQueue.reset( new HttpReplyQueue() ); - ++mStatistics.mCurrentRequests; - ++mStatistics.mTotalRequests; - - - LL_WARNS("HTTPRequest") << "New HttpRequest created (outstanding: " << mStatistics.mCurrentRequests << " total: " << mStatistics.mTotalRequests << ")" << LL_ENDL; + HTTPStats::instance().recordHTTPRequest(); } @@ -81,9 +76,6 @@ HttpRequest::~HttpRequest() } mReplyQueue.reset(); - --mStatistics.mCurrentRequests; - - LL_WARNS("HTTPRequest") << "HttpRequest destroyed (outstanding: " << mStatistics.mCurrentRequests << " total: " << mStatistics.mTotalRequests << ")" << LL_ENDL; } -- cgit v1.2.3