diff --git a/asphr/assert.hpp b/asphr/assert.hpp index 8ff9084..b87ff53 100644 --- a/asphr/assert.hpp +++ b/asphr/assert.hpp @@ -107,25 +107,44 @@ } #define ASPHR_ASSERT(expr) ASPHR_ASSERT_MSG(expr, "") -#define ASPHR_ASSERT_EQ_MSG(a, b, msg) \ - { \ - auto a_val = a; \ - auto b_val = b; \ - if (ASPHR_PREDICT_TRUE((a_val == b_val))) { \ - static_cast(0); \ - } else { \ - PRINT_CERR(#a, a_val); \ - PRINT_CERR(#b, b_val); \ - std::cerr << "Assertion failed: Values '" << #a << "' and '" << #b \ - << "' are different in function '" << __func__ \ - << "' location '" << __FILE__ << ":" << __LINE__ << "': '" \ - << msg << "'.\n"; \ - std::cerr << boost::stacktrace::stacktrace() << std::endl; \ - std::abort(); \ - } \ +#define ASPHR_ASSERT_EQ_MSG(a, b, msg) \ + { \ + auto a_val = a; \ + auto b_val = b; \ + if (ASPHR_PREDICT_TRUE((a_val == b_val))) { \ + static_cast(0); \ + } else { \ + PRINT_CERR(#a, a_val); \ + PRINT_CERR(#b, b_val); \ + std::cerr << "Assertion failed (" << #a << " == " << #b << "): Values '" \ + << #a << "' and '" << #b << "' are different in function '" \ + << __func__ << "' location '" << __FILE__ << ":" << __LINE__ \ + << "': '" << msg << "'.\n"; \ + std::cerr << boost::stacktrace::stacktrace() << std::endl; \ + std::abort(); \ + } \ } #define ASPHR_ASSERT_EQ(a, b) ASPHR_ASSERT_EQ_MSG(a, b, "") +#define ASPHR_ASSERT_NEQ_MSG(a, b, msg) \ + { \ + auto a_val = a; \ + auto b_val = b; \ + if (ASPHR_PREDICT_TRUE((a_val != b_val))) { \ + static_cast(0); \ + } else { \ + PRINT_CERR(#a, a_val); \ + PRINT_CERR(#b, b_val); \ + std::cerr << "Assertion failed (" << #a << " != " << #b << "): Values '" \ + << #a << "' and '" << #b << "' are equal in function '" \ + << __func__ << "' location '" << __FILE__ << ":" << __LINE__ \ + << "': '" << msg << "'.\n"; \ + std::cerr << boost::stacktrace::stacktrace() << std::endl; \ + std::abort(); \ + } \ + } +#define ASPHR_ASSERT_NEQ(a, b) ASPHR_ASSERT_NEQ_MSG(a, b, "") + #else #define ASPHR_ASSERT_MSG(expr, msg) static_cast(0) #define ASPHR_ASSERT(expr) static_cast(0) diff --git a/schema/daemon.proto b/schema/daemon.proto index 7af2dd0..d7055e8 100644 --- a/schema/daemon.proto +++ b/schema/daemon.proto @@ -151,6 +151,7 @@ message GetStatusRequest {} message GetStatusResponse { bool registered = 1; string release_hash = 2; + int32 latency_seconds = 3; } message GetLatencyRequest {}