From c6a2044a2eb52a6d3455dd1d9b832568670befd9 Mon Sep 17 00:00:00 2001
From: Jerome Reybert <jreybert@gmail.com>
Date: Wed, 11 Nov 2015 23:01:05 +0100
Subject: [PATCH] autoload/magit/utils.vim: add magit#utils#start_profile
 function

---
 autoload/magit/utils.vim | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/autoload/magit/utils.vim b/autoload/magit/utils.vim
index 6be7df1..3b5dd5b 100644
--- a/autoload/magit/utils.vim
+++ b/autoload/magit/utils.vim
@@ -173,3 +173,13 @@ endfunction
 function! magit#utils#bufnr()
 	return s:bufnr
 endfunction
+
+function! magit#utils#start_profile(...)
+	let prof_file = ( a:0 == 1 ) ? a:1 : "/tmp/vimagit.log"
+	execute "profile start " . prof_file . " | profile pause"
+	profile! file */plugin/magit.vim
+	profile! file */autoload/magit/*
+	profile! file */common/magit_common.vim
+	profile! file */syntax/magit.vim
+	profile continue
+endfunction
-- 
GitLab