Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Darwin] Remove StartupMetricsCollection from fw init #32744

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions src/darwin/Framework/CHIP/MTRDeviceControllerFactory.mm
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,11 @@
static NSString * const kErrorSessionKeystoreInit = @"Init failure while initializing session keystore";

static bool sExitHandlerRegistered = false;
static void ShutdownOnExit() { [[MTRDeviceControllerFactory sharedInstance] stopControllerFactory]; }
static void ShutdownOnExit()
{
MTR_LOG_INFO("ShutdownOnExit invoked on exit");
[[MTRDeviceControllerFactory sharedInstance] stopControllerFactory];
}

@interface MTRDeviceControllerFactory () {
MTRServerEndpoint * _otaProviderEndpoint;
Expand Down Expand Up @@ -323,6 +327,8 @@ - (void)cleanupInitObjects

- (void)cleanupStartupObjects
{
MTR_LOG_INFO("Cleaning startup objects in controller factory");

// Make sure the deinit order here is the reverse of the init order in
// startControllerFactory:
_certificationDeclarationCertificates = nil;
Expand Down Expand Up @@ -562,7 +568,7 @@ - (void)stopControllerFactory
[_controllers[0] shutdown];
}

MTR_LOG_DEBUG("Shutting down the Matter controller factory");
MTR_LOG_INFO("Shutting down the Matter controller factory");
_controllerFactory->Shutdown();

[self cleanupStartupObjects];
Expand Down
4 changes: 0 additions & 4 deletions src/darwin/Framework/CHIP/MTRFramework.mm
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
*/

#import "MTRFramework.h"
#import "MTRMetricsCollector.h"

#include <dispatch/dispatch.h>
#include <lib/support/CHIPMem.h>
Expand All @@ -35,8 +34,5 @@ void MTRFrameworkInit()
// Suppress CHIP logging until we actually need it for redirection
// (see MTRSetLogCallback()). Logging to os_log is always enabled.
chip::Logging::SetLogFilter(chip::Logging::kLogCategory_None);

// Startup metrics collection and tracing framework
StartupMetricsCollection();
});
}
Loading