mirror of
https://github.com/XRPLF/rippled.git
synced 2026-09-27 15:28:03 +00:00
Sites that exist only to be reported currently spell their own gating: an #ifdef around a member, another around the clock read, another around the call that reports it. That puts preprocessor branches through business logic and leaves each class with a different member set per build. Add kEnabled, Stopwatch and Counter. Each holds real state when telemetry is compiled in and is an empty type with no-op methods when it is not, while the member stays declared in both builds so no class's API differs by configuration. Tests assert both configurations from one file, including that the compiled-out types are empty.