We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4dedd3b commit 4892cbdCopy full SHA for 4892cbd
1 file changed
lua/packer/compile.lua
@@ -85,12 +85,20 @@ local function save_profiles(threshold)
85
end
86
table.sort(sorted_times, function(a, b) return a[2] > b[2] end)
87
local results = {}
88
+ local total_time = 0
89
for i, elem in ipairs(sorted_times) do
90
if not threshold or threshold and elem[2] > threshold then
91
results[i] = elem[1] .. ' took ' .. elem[2] .. 'ms'
92
93
+ total_time = total_time + elem[2]
94
95
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
+
102
_G._packer = _G._packer or {}
103
_G._packer.profile_output = results
104
0 commit comments