fix(#1961): harden profiling functions (#1986)

This commit is contained in:
Alexander Courtis
2023-02-11 17:05:01 +11:00
committed by GitHub
parent 02fdc262eb
commit b712b82b0c
11 changed files with 44 additions and 46 deletions

View File

@@ -140,7 +140,7 @@ 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 %s", opts.project_root, opts.path)
local profile = log.profile_start("git job %s %s", opts.project_root, opts.path)
local self = setmetatable({
project_root = opts.project_root,
@@ -155,7 +155,7 @@ function Runner.run(opts)
self:_run_git_job()
self:_wait()
log.profile_end(ps, "git job %s %s", opts.project_root, opts.path)
log.profile_end(profile)
if self.rc == -1 then
log.line("git", "job timed out %s %s", opts.project_root, opts.path)