mirror of
https://github.com/XRPLF/rippled.git
synced 2026-10-05 19:28:15 +00:00
fix(telemetry): make this branch's files compile clean with telemetry off
The metric macros discard their arguments when telemetry is compiled out, so anything named only as a macro argument disappears in that build. That produced fifteen errors across these files. - guard MetricNames.h in the nine files whose only uses of it are macro arguments; the files that pass those constants as ordinary function arguments still need it unconditionally - drop the prevMode local in setMode, reading the mode being left inline in the macro argument so nothing is computed when telemetry is off - compile out the emit helper in recordBatchOutcome and its three calls, which exist only to report per-outcome counters - drop two includes the telemetry-off test block never used - suppress the static and const suggestions on four methods whose bodies only record metrics; each reads the app_ member when telemetry is enabled
This commit is contained in:
@@ -468,8 +468,6 @@ TEST(MetricsRegistryScaledMean, default_scale_is_one)
|
||||
#include <stdexcept>
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
#include <type_traits>
|
||||
#include <utility>
|
||||
|
||||
using namespace xrpl;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user