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

Commit f7c2bfee authored by Wei Wang's avatar Wei Wang
Browse files

init: add timing log for oneshot and exec_background services

Bug: 136523746
Bug: 138732985
Test: boot
Change-Id: I713edd2ba8a391d5afbea796c6d58ffac9477436
parent ae898442
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -73,6 +73,13 @@ static bool ReapOneProcess() {
                auto exec_duration_ms =
                    std::chrono::duration_cast<std::chrono::milliseconds>(exec_duration).count();
                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 {
            name = StringPrintf("Untracked pid %d", pid);