#791 add profiling for some operations (#1108)

This commit is contained in:
Alexander Courtis
2022-03-26 23:22:28 +11:00
committed by GitHub
parent 015234e032
commit 54c78dbca2
8 changed files with 46 additions and 5 deletions

View File

@@ -128,6 +128,8 @@ end
-- This module runs a git process, which will be killed if it takes more than timeout which defaults to 400ms
function Runner.run(opts)
local ps = log.profile_start("git job %s", opts.project_root)
local self = setmetatable({
project_root = opts.project_root,
list_untracked = opts.list_untracked,
@@ -140,6 +142,8 @@ function Runner.run(opts)
self:_run_git_job()
self:_wait()
log.profile_end(ps, "git job %s", opts.project_root)
if self.rc == -1 then
log.line("git", "job timed out")
elseif self.rc ~= 0 then