wsd: time the duration of fork

Change-Id: I92f624139f274df95a47f430802a29d33d587689
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
This commit is contained in:
Ashod Nakashian 2023-02-16 18:12:51 -05:00 committed by Ashod Nakashian
parent ed341a61ad
commit 74d6739f0d

View file

@ -382,6 +382,7 @@ static int createLibreOfficeKit(const std::string& childRoot,
++spareKitId;
LOG_DBG("Forking a coolkit process with jailId: " << jailId << " as spare coolkit #"
<< spareKitId << '.');
const auto startForkingTime = std::chrono::steady_clock::now();
const pid_t pid = fork();
if (!pid)
@ -428,6 +429,10 @@ static int createLibreOfficeKit(const std::string& childRoot,
#endif
}
const auto duration = (std::chrono::steady_clock::now() - startForkingTime);
const auto durationMs = std::chrono::duration_cast<std::chrono::milliseconds>(duration);
LOG_TRC("Forking child took " << durationMs);
return pid;
}