mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Add Antithesis intrumentation (#5042)
* Copy Antithesis SDK version 0.4.0 to directory external/ * Add build option `voidstar` to enable instrumentation with Antithesis SDK * Define instrumentation macros ASSERT and UNREACHABLE in terms of regular C assert * Replace asserts with named ASSERT or UNREACHABLE * Add UNREACHABLE to LogicError * Document instrumentation macros in CONTRIBUTING.md
This commit is contained in:
@@ -22,6 +22,7 @@
|
||||
|
||||
#include <xrpl/basics/Log.h>
|
||||
#include <xrpl/beast/net/IPAddressConversion.h>
|
||||
#include <xrpl/beast/utility/instrumentation.h>
|
||||
#include <xrpl/server/Session.h>
|
||||
#include <xrpl/server/detail/io_list.h>
|
||||
#include <boost/asio/ip/tcp.hpp>
|
||||
@@ -34,7 +35,6 @@
|
||||
#include <boost/beast/http/parser.hpp>
|
||||
#include <boost/beast/http/read.hpp>
|
||||
#include <atomic>
|
||||
#include <cassert>
|
||||
#include <chrono>
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
|
||||
@@ -21,12 +21,12 @@
|
||||
#define RIPPLE_SERVER_BASEPEER_H_INCLUDED
|
||||
|
||||
#include <xrpl/beast/utility/WrappedSink.h>
|
||||
#include <xrpl/beast/utility/instrumentation.h>
|
||||
#include <xrpl/server/Port.h>
|
||||
#include <xrpl/server/detail/LowestLayer.h>
|
||||
#include <xrpl/server/detail/io_list.h>
|
||||
#include <boost/asio.hpp>
|
||||
#include <atomic>
|
||||
#include <cassert>
|
||||
#include <functional>
|
||||
#include <string>
|
||||
|
||||
|
||||
@@ -21,17 +21,21 @@
|
||||
#define RIPPLE_SERVER_BASEWSPEER_H_INCLUDED
|
||||
|
||||
#include <xrpl/basics/safe_cast.h>
|
||||
#include <xrpl/beast/utility/instrumentation.h>
|
||||
#include <xrpl/beast/utility/rngfill.h>
|
||||
#include <xrpl/crypto/csprng.h>
|
||||
#include <xrpl/protocol/BuildInfo.h>
|
||||
#include <xrpl/server/WSSession.h>
|
||||
#include <xrpl/server/detail/BasePeer.h>
|
||||
#include <xrpl/server/detail/LowestLayer.h>
|
||||
|
||||
#include <boost/beast/core/multi_buffer.hpp>
|
||||
#include <boost/beast/http/message.hpp>
|
||||
#include <boost/beast/websocket.hpp>
|
||||
#include <boost/logic/tribool.hpp>
|
||||
|
||||
#include <cassert>
|
||||
#include <functional>
|
||||
#include <list>
|
||||
|
||||
namespace ripple {
|
||||
|
||||
@@ -508,7 +512,9 @@ template <class String>
|
||||
void
|
||||
BaseWSPeer<Handler, Impl>::fail(error_code ec, String const& what)
|
||||
{
|
||||
assert(strand_.running_in_this_thread());
|
||||
ASSERT(
|
||||
strand_.running_in_this_thread(),
|
||||
"ripple::BaseWSPeer::fail : strand in this thread");
|
||||
|
||||
cancel_timer();
|
||||
if (!ec_ && ec != boost::asio::error::operation_aborted)
|
||||
|
||||
Reference in New Issue
Block a user