File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -85,12 +85,20 @@ local function save_profiles(threshold)
8585 end
8686 table.sort(sorted_times, function(a, b) return a[2] > b[2] end)
8787 local results = {}
88+ local total_time = 0
8889 for i, elem in ipairs(sorted_times) do
8990 if not threshold or threshold and elem[2] > threshold then
9091 results[i] = elem[1] .. ' took ' .. elem[2] .. 'ms'
9192 end
93+ total_time = total_time + elem[2]
9294 end
9395
96+ if threshold then
97+ table.insert(results, '(Only showing plugins that took longer than ' .. threshold .. ' ms ' .. 'to load)')
98+ end
99+ table.insert(results, '')
100+ table.insert(results, 'Total time: ' .. total_time .. 'ms')
101+
94102 _G._packer = _G._packer or {}
95103 _G._packer.profile_output = results
96104end
You can’t perform that action at this time.
0 commit comments