Log how long it takes to start more netd components.
This allows us to catch issues such as:
03-27 05:46:16.268 398 398 I Netd : Registering NetdNativeService: 1005.5ms
Bug: 34873832
Test: bullhead builds, boots
Test: observed log messages on boot
Change-Id: I69a33affa2379a206c6a8d76b481913a248a715d
diff --git a/server/main.cpp b/server/main.cpp
index 4cc5838..8d0aa1c 100644
--- a/server/main.cpp
+++ b/server/main.cpp
@@ -113,11 +113,13 @@
exit(1);
}
+ Stopwatch subTime;
status_t ret;
if ((ret = NetdNativeService::start()) != android::OK) {
ALOGE("Unable to start NetdNativeService: %d", ret);
exit(1);
}
+ ALOGI("Registering NetdNativeService: %.1fms", subTime.getTimeAndReset());
/*
* Now that we're up, we can respond to commands. Starting the listener also tells
@@ -127,6 +129,7 @@
ALOGE("Unable to start CommandListener (%s)", strerror(errno));
exit(1);
}
+ ALOGI("Starting CommandListener: %.1fms", subTime.getTimeAndReset());
write_pid_file();