Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1995ec4f authored by Wei Wang's avatar Wei Wang Committed by android-build-merger
Browse files

Merge "init: add timing log for oneshot and exec_background services" am:...

Merge "init: add timing log for oneshot and exec_background services" am: 81e25f5e am: bdf354f0 am: b317dabb am: 93578d95
am: a4460ceb

Change-Id: If4f6f36b93a8af3851693b08c701d61bea3f6b5c
parents 8c3cf0e6 a4460ceb
Loading
Loading
Loading
Loading
+7 −0
Original line number Original line Diff line number Diff line
@@ -73,6 +73,13 @@ static bool ReapOneProcess() {
                auto exec_duration_ms =
                auto exec_duration_ms =
                    std::chrono::duration_cast<std::chrono::milliseconds>(exec_duration).count();
                    std::chrono::duration_cast<std::chrono::milliseconds>(exec_duration).count();
                wait_string = StringPrintf(" waiting took %f seconds", exec_duration_ms / 1000.0f);
                wait_string = StringPrintf(" waiting took %f seconds", exec_duration_ms / 1000.0f);
            } else if (service->flags() & SVC_ONESHOT) {
                auto exec_duration = boot_clock::now() - service->time_started();
                auto exec_duration_ms =
                        std::chrono::duration_cast<std::chrono::milliseconds>(exec_duration)
                                .count();
                wait_string = StringPrintf(" oneshot service took %f seconds in background",
                                           exec_duration_ms / 1000.0f);
            }
            }
        } else {
        } else {
            name = StringPrintf("Untracked pid %d", pid);
            name = StringPrintf("Untracked pid %d", pid);