Skip to content

Commit

Permalink
Restyler fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
anush-apple committed Feb 23, 2024
1 parent b5d7d37 commit 04514d7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/darwin/Framework/CHIP/MTRMetrics.mm
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
#import "MTRLogging_Internal.h"
#import "MTRMetrics_Internal.h"
#include <Foundation/Foundation.h>
#include <Matter/MTRMetrics.h>
#import <Matter/MTRDefines.h>
#include <Matter/MTRMetrics.h>

@implementation MTRMetrics {
NSMutableDictionary<NSString *, id> * _metricsData;
Expand Down
12 changes: 3 additions & 9 deletions src/tracing/metric_event.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
#pragma once

#include <lib/core/CHIPError.h>
#include <lib/support/CodeUtils.h>
#include <tracing/metric_keys.h>
#include <tracing/metric_macros.h>
#include <tracing/registry.h>
#include <lib/support/CodeUtils.h>

namespace chip {
namespace Tracing {
Expand Down Expand Up @@ -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
{
Expand Down Expand Up @@ -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;
Expand Down
5 changes: 3 additions & 2 deletions src/tracing/metric_macros.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 04514d7

Please sign in to comment.