aboutsummaryrefslogtreecommitdiffhomepage
path: root/vim/plugin
diff options
context:
space:
mode:
authorGravatar Bart Trojanowski <bart@jukie.net>2009-11-20 15:42:18 -0500
committerGravatar Bart Trojanowski <bart@jukie.net>2009-11-25 00:48:52 -0500
commitf3d3e74b97ad3d0824e1a9a38c26252b4a0a74a4 (patch)
tree2154ace8e28a29695c56885e2597a8f5c16dbd82 /vim/plugin
parent71c9dbb71db5de37d647ca9899e4749be305b622 (diff)
debug code to measure how long calls to system() take
Diffstat (limited to 'vim/plugin')
-rw-r--r--vim/plugin/notmuch.vim9
1 files changed, 8 insertions, 1 deletions
diff --git a/vim/plugin/notmuch.vim b/vim/plugin/notmuch.vim
index 2ddc8160..57bcdac9 100644
--- a/vim/plugin/notmuch.vim
+++ b/vim/plugin/notmuch.vim
@@ -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