mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-25 20:38:08 +01:00
debug code to measure how long calls to system() take
This commit is contained in:
parent
71c9dbb71d
commit
f3d3e74b97
1 changed files with 8 additions and 1 deletions
|
@ -658,8 +658,15 @@ endfunction
|
|||
|
||||
function! s:NM_run(args)
|
||||
let cmd = g:notmuch_cmd . ' ' . join(a:args) . '< /dev/null'
|
||||
|
||||
let start = reltime()
|
||||
let out = system(cmd)
|
||||
if v:shell_error
|
||||
let err = v:shell_error
|
||||
let delta = reltime(start)
|
||||
|
||||
echo printf('[%s] {%s} %s', reltimestr(delta), string(err), string(cmd))
|
||||
|
||||
if err
|
||||
echohl Error
|
||||
echo substitute(out, '\n*$', '', '')
|
||||
echohl None
|
||||
|
|
Loading…
Reference in a new issue