Skip to content

Instantly share code, notes, and snippets.

@mgalgs
Created August 5, 2013 18:48
Show Gist options
  • Save mgalgs/6158358 to your computer and use it in GitHub Desktop.
Save mgalgs/6158358 to your computer and use it in GitHub Desktop.
diff --git a/magit.el b/magit.el
index 4b3c1fa..949365b 100644
--- a/magit.el
+++ b/magit.el
@@ -1076,12 +1076,19 @@ Read `completing-read' documentation for the meaning of the argument."
(insert (magit-cmd-output cmd args)))
(defun magit-cmd-output (cmd args)
- (with-output-to-string
- (with-current-buffer standard-output
- (apply #'process-file
+ (let ((time-before (float-time)))
+ (message "Running %s %s\n" cmd args)
+ (with-output-to-string
+ (with-current-buffer standard-output
+ (apply #'process-file
+ cmd
+ nil (list t nil) nil
+ args)))
+ (message "%s %s --> Elapsed: %f seconds\n"
cmd
- nil (list t nil) nil
- args))))
+ args
+ (- (float-time)
+ time-before))))
(defun magit-git-string (&rest args)
(magit-trim-line (magit-git-output args)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment