Fix handling of HTTP/S keep-alives (RIPD-556):

* Proper shutdown for ssl and non-ssl connections
* Report session id in history
* Report histogram of requests per session
* Change print name to 'http'
* Split logging into "HTTP" and "HTTP-RPC" partitions
* More logging and refinement of logging severities
* Log the request count when a session is destroyed

Conflicts:
	src/ripple/http/impl/Peer.cpp
	src/ripple/http/impl/Peer.h
	src/ripple/http/impl/ServerImpl.cpp
	src/ripple/module/app/main/Application.cpp
	src/ripple/module/app/main/RPCHTTPServer.cpp
This commit is contained in:
Vinnie Falco
2014-09-08 14:04:16 -07:00
parent 319ac14e7d
commit ee8bd8ddae
12 changed files with 529 additions and 236 deletions

View File

@@ -28,6 +28,7 @@
#include <beast/module/asio/basics/SharedArg.h>
#include <boost/asio.hpp>
#include <boost/optional.hpp>
#include <array>
#include <chrono>
#include <condition_variable>
#include <deque>
@@ -43,6 +44,7 @@ class Peer;
struct Stat
{
std::size_t id;
std::string when;
std::chrono::seconds elapsed;
int requests;
@@ -88,6 +90,8 @@ private:
State state_;
Doors m_doors;
std::deque <Stat> stats_;
std::array <std::size_t, 64> hist_;
int high_ = 0;
public:
ServerImpl (Server& server, Handler& handler, beast::Journal journal);
@@ -136,6 +140,10 @@ public:
onWrite (beast::PropertyStream::Map& map);
private:
static
int
ceil_log2 (unsigned long long x);
static
int
compare (Port const& lhs, Port const& rhs);