BitShares-Core  7.0.2
BitShares blockchain node software and command-line wallet software
Classes | Namespaces | Macros
node.cpp File Reference
#include <sstream>
#include <iomanip>
#include <deque>
#include <unordered_set>
#include <list>
#include <forward_list>
#include <iostream>
#include <algorithm>
#include <tuple>
#include <string>
#include <boost/tuple/tuple.hpp>
#include <boost/circular_buffer.hpp>
#include <boost/multi_index_container.hpp>
#include <boost/multi_index/ordered_index.hpp>
#include <boost/multi_index/mem_fun.hpp>
#include <boost/multi_index/member.hpp>
#include <boost/multi_index/random_access_index.hpp>
#include <boost/multi_index/tag.hpp>
#include <boost/multi_index/sequenced_index.hpp>
#include <boost/multi_index/hashed_index.hpp>
#include <boost/logic/tribool.hpp>
#include <boost/range/algorithm_ext/push_back.hpp>
#include <boost/range/algorithm/find.hpp>
#include <boost/range/numeric.hpp>
#include <boost/preprocessor/seq/for_each.hpp>
#include <boost/preprocessor/cat.hpp>
#include <boost/preprocessor/stringize.hpp>
#include <fc/thread/thread.hpp>
#include <fc/thread/future.hpp>
#include <fc/thread/non_preemptable_scope_check.hpp>
#include <fc/thread/mutex.hpp>
#include <fc/thread/scoped_lock.hpp>
#include <fc/log/logger.hpp>
#include <fc/io/json.hpp>
#include <fc/io/enum_type.hpp>
#include <fc/io/raw.hpp>
#include <fc/crypto/rand.hpp>
#include <fc/network/ip.hpp>
#include <fc/network/resolve.hpp>
#include <graphene/net/node.hpp>
#include <graphene/net/peer_database.hpp>
#include <graphene/net/peer_connection.hpp>
#include <graphene/net/stcp_socket.hpp>
#include <graphene/net/config.hpp>
#include <graphene/net/exceptions.hpp>
#include <graphene/chain/config.hpp>
#include <graphene/chain/exceptions.hpp>
#include <graphene/protocol/fee_schedule.hpp>
#include <fc/git_revision.hpp>
#include "node_impl.hxx"

Go to the source code of this file.

Classes

class  graphene::net::detail::generic_list_address_builder
 Base class for list address builder and exclude_list address builder. More...
 
class  graphene::net::detail::list_address_builder
 
class  graphene::net::detail::exclude_address_builder
 
class  graphene::net::detail::all_address_builder
 

Namespaces

 graphene
 
 graphene::net
 
 graphene::net::detail
 

Macros

#define VERIFY_CORRECT_THREAD()   assert(_thread->is_current())
 
#define INVOKE_IN_IMPL(method_name, ...)   return my->_thread->async([&](){ return my->method_name(__VA_ARGS__); }, "thread invoke for method " BOOST_PP_STRINGIZE(method_name)).wait()
 
#define ROLLING_WINDOW_SIZE   1000
 
#define INITIALIZE_ACCUMULATOR(r, data, method_name)
 
#define ADD_STATISTICS_FOR_METHOD(r, data, method_name)
 
#define INVOKE_AND_COLLECT_STATISTICS(method_name, ...)
 

Macro Definition Documentation

◆ ADD_STATISTICS_FOR_METHOD

#define ADD_STATISTICS_FOR_METHOD (   r,
  data,
  method_name 
)
Value:
fc::mutable_variant_object BOOST_PP_CAT(method_name, _stats); \
BOOST_PP_CAT(method_name, _stats)["min"] = boost::accumulators::min(BOOST_PP_CAT(_, BOOST_PP_CAT(method_name, _execution_accumulator))); \
BOOST_PP_CAT(method_name, _stats)["mean"] = boost::accumulators::rolling_mean(BOOST_PP_CAT(_, BOOST_PP_CAT(method_name, _execution_accumulator))); \
BOOST_PP_CAT(method_name, _stats)["max"] = boost::accumulators::max(BOOST_PP_CAT(_, BOOST_PP_CAT(method_name, _execution_accumulator))); \
BOOST_PP_CAT(method_name, _stats)["sum"] = boost::accumulators::sum(BOOST_PP_CAT(_, BOOST_PP_CAT(method_name, _execution_accumulator))); \
BOOST_PP_CAT(method_name, _stats)["delay_before_min"] = boost::accumulators::min(BOOST_PP_CAT(_, BOOST_PP_CAT(method_name, _delay_before_accumulator))); \
BOOST_PP_CAT(method_name, _stats)["delay_before_mean"] = boost::accumulators::rolling_mean(BOOST_PP_CAT(_, BOOST_PP_CAT(method_name, _delay_before_accumulator))); \
BOOST_PP_CAT(method_name, _stats)["delay_before_max"] = boost::accumulators::max(BOOST_PP_CAT(_, BOOST_PP_CAT(method_name, _delay_before_accumulator))); \
BOOST_PP_CAT(method_name, _stats)["delay_before_sum"] = boost::accumulators::sum(BOOST_PP_CAT(_, BOOST_PP_CAT(method_name, _delay_before_accumulator))); \
BOOST_PP_CAT(method_name, _stats)["delay_after_min"] = boost::accumulators::min(BOOST_PP_CAT(_, BOOST_PP_CAT(method_name, _delay_after_accumulator))); \
BOOST_PP_CAT(method_name, _stats)["delay_after_mean"] = boost::accumulators::rolling_mean(BOOST_PP_CAT(_, BOOST_PP_CAT(method_name, _delay_after_accumulator))); \
BOOST_PP_CAT(method_name, _stats)["delay_after_max"] = boost::accumulators::max(BOOST_PP_CAT(_, BOOST_PP_CAT(method_name, _delay_after_accumulator))); \
BOOST_PP_CAT(method_name, _stats)["delay_after_sum"] = boost::accumulators::sum(BOOST_PP_CAT(_, BOOST_PP_CAT(method_name, _delay_after_accumulator))); \
BOOST_PP_CAT(method_name, _stats)["count"] = boost::accumulators::count(BOOST_PP_CAT(_, BOOST_PP_CAT(method_name, _execution_accumulator))); \
statistics[BOOST_PP_STRINGIZE(method_name)] = BOOST_PP_CAT(method_name, _stats);

◆ INITIALIZE_ACCUMULATOR

#define INITIALIZE_ACCUMULATOR (   r,
  data,
  method_name 
)
Value:
, BOOST_PP_CAT(_, BOOST_PP_CAT(method_name, _execution_accumulator))(boost::accumulators::tag::rolling_window::window_size = ROLLING_WINDOW_SIZE) \
, BOOST_PP_CAT(_, BOOST_PP_CAT(method_name, _delay_before_accumulator))(boost::accumulators::tag::rolling_window::window_size = ROLLING_WINDOW_SIZE) \
, BOOST_PP_CAT(_, BOOST_PP_CAT(method_name, _delay_after_accumulator))(boost::accumulators::tag::rolling_window::window_size = ROLLING_WINDOW_SIZE)

Definition at line 5232 of file node.cpp.

◆ INVOKE_AND_COLLECT_STATISTICS

#define INVOKE_AND_COLLECT_STATISTICS (   method_name,
  ... 
)
Value:
std::shared_ptr<call_statistics_collector> statistics_collector = std::make_shared<call_statistics_collector>( \
#method_name, \
&_ ## method_name ## _execution_accumulator, \
&_ ## method_name ## _delay_before_accumulator, \
&_ ## method_name ## _delay_after_accumulator); \
if (_thread->is_current()) \
{ \
call_statistics_collector::actual_execution_measurement_helper helper(statistics_collector); \
return _node_delegate->method_name(__VA_ARGS__); \
} \
else \
return _thread->async([&, statistics_collector](){ \
call_statistics_collector::actual_execution_measurement_helper helper(statistics_collector); \
return _node_delegate->method_name(__VA_ARGS__); \
}, "invoke " BOOST_STRINGIZE(method_name)).wait()

Definition at line 5314 of file node.cpp.

◆ INVOKE_IN_IMPL

#define INVOKE_IN_IMPL (   method_name,
  ... 
)    return my->_thread->async([&](){ return my->method_name(__VA_ARGS__); }, "thread invoke for method " BOOST_PP_STRINGIZE(method_name)).wait()

Definition at line 5063 of file node.cpp.

◆ ROLLING_WINDOW_SIZE

#define ROLLING_WINDOW_SIZE   1000

Definition at line 5231 of file node.cpp.

◆ VERIFY_CORRECT_THREAD

#define VERIFY_CORRECT_THREAD ( )    assert(_thread->is_current())

Definition at line 150 of file node.cpp.

fc::mutable_variant_object
An order-perserving dictionary of variant's.
Definition: variant_object.hpp:108
ROLLING_WINDOW_SIZE
#define ROLLING_WINDOW_SIZE
Definition: node.cpp:5231
fc::wait
T wait(boost::signals2::signal< void(T)> &sig, const microseconds &timeout_us=microseconds::maximum())
Definition: signals.hpp:38