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

@@ -28,7 +28,7 @@ function M.fn(fname)
end
running[fname_real] = true
local ps = log.profile_start("find file %s", fname_real)
local profile = log.profile_start("find file %s", fname_real)
-- we cannot wait for watchers
reload.refresh_nodes_for_path(vim.fn.fnamemodify(fname_real, ":h"))
@@ -71,7 +71,7 @@ function M.fn(fname)
running[fname_real] = false
log.profile_end(ps, "find file %s", fname_real)
log.profile_end(profile)
end
return M