8#include <userver/engine/task/task_processor_fwd.hpp> 
    9#include <userver/formats/json/value.hpp> 
   10#include <userver/utils/function_ref.hpp> 
   13#include <fmt/format.h> 
   16#include <userver/rcu/rcu.hpp> 
   17#include <userver/utils/async.hpp> 
   19USERVER_NAMESPACE_BEGIN
 
   33bool IsTestpointEnabled(std::string_view name) 
noexcept;
 
   35void ExecuteTestpointCoro(std::string_view name,
 
   36                          const formats::
json::Value& json,
 
   37                          TestpointCallback callback);
 
   39void ExecuteTestpointBlocking(std::string_view name,
 
   40                              const formats::
json::Value& json,
 
   41                              TestpointCallback callback,
 
   42                              engine::TaskProcessor& task_processor);
 
   44void DoNothing(
const formats::
json::Value&) 
noexcept;
 
   67#define TESTPOINT_CALLBACK(name, json, callback) 
   70            !USERVER_NAMESPACE
::testsuite::AreTestpointsAvailable(), true)) 
   74    const auto& userver_impl_tp_name = name; 
   75    if (!USERVER_NAMESPACE
::testsuite::impl::IsTestpointEnabled( 
   76            userver_impl_tp_name)) 
   79    USERVER_NAMESPACE
::testsuite::impl::ExecuteTestpointCoro( 
   80        userver_impl_tp_name, json, callback); 
   99#define TESTPOINT(name, json) 
  110#define TESTPOINT_CALLBACK_NONCORO(name, json, task_processor, callback) 
  112    if (__builtin_expect( 
  113            !USERVER_NAMESPACE
::testsuite::AreTestpointsAvailable(), true)) 
  117    const auto& userver_impl_tp_name = name; 
  118    if (!USERVER_NAMESPACE
::testsuite::impl::IsTestpointEnabled( 
  119            userver_impl_tp_name)) 
  122    USERVER_NAMESPACE
::testsuite::impl::ExecuteTestpointBlocking( 
  123        userver_impl_tp_name, json, callback, task_processor); 
  134#define TESTPOINT_NONCORO(name, json, task_processor) 
  136                             USERVER_NAMESPACE
::testsuite::impl::DoNothing)