summaryrefslogtreecommitdiff
path: root/indra/llcorehttp/_httpoprequest.cpp
diff options
context:
space:
mode:
authorRider Linden <rider@lindenlab.com>2017-07-28 14:07:25 -0700
committerRider Linden <rider@lindenlab.com>2017-07-28 14:07:25 -0700
commit57d5744f2c064ccb7bf8dd3dca2a24f6755297ac (patch)
treecef79679961afaf2ef43f21c6f4901ed3f536fb0 /indra/llcorehttp/_httpoprequest.cpp
parentb46697fcc155d026b5a951256d53581e7af20036 (diff)
MAINT-7634: Move StatsAccumulator into llcommon, collect data sent and error codes from core.
Diffstat (limited to 'indra/llcorehttp/_httpoprequest.cpp')
-rw-r--r--indra/llcorehttp/_httpoprequest.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/indra/llcorehttp/_httpoprequest.cpp b/indra/llcorehttp/_httpoprequest.cpp
index 07cc0e4625..f35f9848ff 100644
--- a/indra/llcorehttp/_httpoprequest.cpp
+++ b/indra/llcorehttp/_httpoprequest.cpp
@@ -47,6 +47,8 @@
#include "llhttpconstants.h"
#include "llproxy.h"
+#include "httpstats.h"
+
// *DEBUG: "[curl:bugs] #1420" problem and testing.
//
// A pipelining problem, https://sourceforge.net/p/curl/bugs/1420/,
@@ -805,6 +807,7 @@ size_t HttpOpRequest::writeCallback(void * data, size_t size, size_t nmemb, void
}
const size_t req_size(size * nmemb);
const size_t write_size(op->mReplyBody->append(static_cast<char *>(data), req_size));
+ HTTPStats::instance().recordDataDown(write_size);
return write_size;
}
@@ -833,7 +836,8 @@ size_t HttpOpRequest::readCallback(void * data, size_t size, size_t nmemb, void
const size_t do_size((std::min)(req_size, body_size - op->mCurlBodyPos));
const size_t read_size(op->mReqBody->read(op->mCurlBodyPos, static_cast<char *>(data), do_size));
- op->mCurlBodyPos += read_size;
+ HTTPStats::instance().recordDataUp(read_size);
+ op->mCurlBodyPos += read_size;
return read_size;
}