mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Cleanups:
* Reduce Beast dependencies * Remove unnecessary includes * Don't use deprecated bassert macros * Don't use beast::String in Json::Value
This commit is contained in:
@@ -28,7 +28,6 @@
|
||||
#include <beast/asio/error.h> // for is_short_read?
|
||||
#include <beast/http/message.h>
|
||||
#include <beast/http/parser.h>
|
||||
#include <beast/module/core/time/Time.h>
|
||||
#include <boost/asio/ip/tcp.hpp>
|
||||
#include <boost/asio/ssl/stream.hpp>
|
||||
#include <boost/asio/streambuf.hpp>
|
||||
@@ -104,7 +103,6 @@ protected:
|
||||
boost::system::error_code ec_;
|
||||
|
||||
clock_type::time_point when_;
|
||||
std::string when_str_;
|
||||
int request_count_ = 0;
|
||||
std::size_t bytes_in_ = 0;
|
||||
std::size_t bytes_out_ = 0;
|
||||
@@ -248,8 +246,6 @@ Peer<Impl>::Peer (Door& door, boost::asio::io_service& io_service,
|
||||
if (journal_.trace) journal_.trace << id_ <<
|
||||
"accept: " << remote_address_.address();
|
||||
when_ = clock_type::now();
|
||||
when_str_ = beast::Time::getCurrentTime().formatted (
|
||||
"%Y-%b-%d %H:%M:%S").toStdString();
|
||||
}
|
||||
|
||||
template <class Impl>
|
||||
@@ -257,7 +253,6 @@ Peer<Impl>::~Peer()
|
||||
{
|
||||
Stat stat;
|
||||
stat.id = nid_;
|
||||
stat.when = std::move (when_str_);
|
||||
stat.elapsed = std::chrono::duration_cast <
|
||||
std::chrono::seconds> (clock_type::now() - when_);
|
||||
stat.requests = request_count_;
|
||||
|
||||
@@ -90,7 +90,6 @@ ServerImpl::onWrite (beast::PropertyStream::Map& map)
|
||||
beast::PropertyStream::Map item (set);
|
||||
|
||||
item ["id"] = stat.id;
|
||||
item ["when"] = stat.when;
|
||||
|
||||
{
|
||||
std::stringstream ss;
|
||||
|
||||
@@ -45,7 +45,6 @@ class Door;
|
||||
struct Stat
|
||||
{
|
||||
std::size_t id;
|
||||
std::string when;
|
||||
std::chrono::seconds elapsed;
|
||||
int requests;
|
||||
std::size_t bytes_in;
|
||||
|
||||
Reference in New Issue
Block a user