diff --git a/src/darwin/Framework/CHIP/MTRMetrics.mm b/src/darwin/Framework/CHIP/MTRMetrics.mm index b7851184970aed..8c338b70285e08 100644 --- a/src/darwin/Framework/CHIP/MTRMetrics.mm +++ b/src/darwin/Framework/CHIP/MTRMetrics.mm @@ -17,8 +17,8 @@ #import "MTRLogging_Internal.h" #import "MTRMetrics_Internal.h" #include -#include #import +#include @implementation MTRMetrics { NSMutableDictionary * _metricsData; diff --git a/src/tracing/metric_event.h b/src/tracing/metric_event.h index e155df7bf4b400..7bb5d8b5b81b51 100644 --- a/src/tracing/metric_event.h +++ b/src/tracing/metric_event.h @@ -17,10 +17,10 @@ #pragma once #include +#include #include #include #include -#include namespace chip { namespace Tracing { @@ -117,10 +117,7 @@ class MetricEvent MetricKey key() const { return mKey; } - Value::Type ValueType() const - { - return mValue.type; - } + Value::Type ValueType() const { return mValue.type; } uint32_t ValueUInt32() const { @@ -181,10 +178,7 @@ class ScopedMetricEvent IgnoreUnusedVariable(mError); } - ~ScopedMetricEvent() - { - MATTER_LOG_METRIC_END(mKey, mError); - } + ~ScopedMetricEvent() { MATTER_LOG_METRIC_END(mKey, mError); } private: MetricKey mKey; diff --git a/src/tracing/metric_macros.h b/src/tracing/metric_macros.h index 6361c4744153c9..4ff85f353701b3 100644 --- a/src/tracing/metric_macros.h +++ b/src/tracing/metric_macros.h @@ -60,7 +60,8 @@ * @param[in] error A ChipError object to be evaluated against success (CHIP_NO_ERROR). * */ -#define SuccessOrExitWithMetric(kMetricKey, error) nlEXPECT(::chip::Tracing::ErrorHandling::LogMetricIfError((kMetricKey), (error)), exit) +#define SuccessOrExitWithMetric(kMetricKey, error) \ + nlEXPECT(::chip::Tracing::ErrorHandling::LogMetricIfError((kMetricKey), (error)), exit) /** * @def VerifyOrExitWithMetric(kMetricKey, aCondition, anAction) @@ -212,7 +213,7 @@ * @param[in] key The key representing the metric name/event. * @param[in] error Reference to a ChipError object that is used as the value of the End event. */ -#define MATTER_LOG_METRIC_SCOPE(key, error) \ +#define MATTER_LOG_METRIC_SCOPE(key, error) \ ::chip::Tracing::ScopedMetricEvent __LOG_METRIC_MACRO_CONCAT(_metric_scope, __COUNTER__)(key, error) #else // Tracing is disabled