From 1802d11cc766f04e75e93c7f98dcf52fb2e64149 Mon Sep 17 00:00:00 2001 From: Nick Desaulniers Date: Tue, 15 Nov 2016 00:53:00 +0000 Subject: [PATCH] Revert "init: warn slow action" This reverts commit b1a309ac1f08df9864ba2c364225a6bb172fd003. Bug: 32712851 Bug: 32838381 Change-Id: Ib4c47de5ea5b0bad765a43cbff9f73d9978729d4 --- init/action.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/init/action.cpp b/init/action.cpp index a12f2253c..ed88f6d89 100644 --- a/init/action.cpp +++ b/init/action.cpp @@ -118,16 +118,14 @@ void Action::ExecuteCommand(const Command& command) const { Timer t; int result = command.InvokeFunc(); - double duration_ms = t.duration() * 1000; - // Any action longer than 50ms will be warned to user as slow operation - if (duration_ms > 50.0 || - android::base::GetMinimumLogSeverity() <= android::base::DEBUG) { + // TODO: this should probably be changed to "if (failed || took a long time)"... + if (android::base::GetMinimumLogSeverity() <= android::base::DEBUG) { std::string trigger_name = BuildTriggersString(); std::string cmd_str = command.BuildCommandString(); std::string source = command.BuildSourceString(); LOG(INFO) << "Command '" << cmd_str << "' action=" << trigger_name << source - << " returned " << result << " took " << duration_ms << "ms."; + << " returned " << result << " took " << t.duration() << "s"; } }