Crates.io | vim-profiler |
lib.rs | vim-profiler |
version | 0.0.4 |
source | src |
created_at | 2021-07-10 03:17:20.21687 |
updated_at | 2021-12-20 23:17:07.067858 |
description | A vim profiling tool |
homepage | https://github.com/terror/vim-profiler |
repository | https://github.com/terror/vim-profiler |
max_upload_size | |
id | 420978 |
size | 67,120 |
vim-profiler
is a wrapper around the (n)vim --startuptime
command, written in Rust. The binary is called
vp
and has only been tested on a Unix based system.
Here is a quick demo showcasing the main functionality of the program.
You can install vim-profiler
with the rust package manager Cargo:
$ cargo install vim-profiler
vim-profiler 0.0.4
A vim profiling tool.
USAGE:
vp [FLAGS] [OPTIONS]
FLAGS:
-h, --help Prints help information
-r, --reverse Display the plugin times in reverse order (fastest first)
-s, --sys Show system plugins in the output
-V, --version Prints version information
-v, --verbose Add informative messages during program execution
OPTIONS:
-c, --command <command> The command to run, e.g vim or neovim [default: vim]
-n, --count <count> The number of plugins to list in the output
-e, --export <path> Export the results to a CSV file
-f, --file <file> A file to open
-i, --iter <iter> The number of iterations
-p, --plot <path> Plot the data and save it to a SVG file
-x, --precision <precision> Precision in the output
This utility allows for exporting results to either in a .svg
file in the form
of a plot or in a .csv
file, where extra statistics are written.
The plot visualizes the start times of each plugin in your plugin directory. If
you invoke vp
with the --plot
option, you will receive a plot in the form of
an SVG file in the specified path that looks something like:
The CSV file contains various other useful statistics such as:
If you invoke vp
with the --export
option you will receive a CSV file with
the additional statistics called in the specified path that looks something
like:
Plugin | Max | Min | Median | Average | Deviation |
---|---|---|---|---|---|
vim-airline | 11.59700 | 9.37200 | 11.05550 | 10.83430 | 0.64257 |
coc.nvim | 9.26900 | 6.92700 | 8.26750 | 8.03870 | 0.74723 |
vimwiki | 7.74400 | 5.25200 | 6.83400 | 6.53550 | 0.81209 |
vim-polyglot | 7.01600 | 3.62900 | 4.22350 | 4.70690 | 1.09417 |
tabular | 4.18500 | 2.53700 | 3.21100 | 3.19110 | 0.50241 |
vim-gitgutter | 3.35000 | 2.10800 | 2.63900 | 2.70540 | 0.45181 |
emmet-vim | 3.36700 | 2.16800 | 2.30200 | 2.45460 | 0.34839 |
ale | 3.21800 | 1.54900 | 1.85950 | 2.04930 | 0.52316 |
vim-crypto | 2.99100 | 1.61400 | 1.81100 | 2.03940 | 0.43480 |
fzf.vim | 1.83000 | 0.94600 | 1.13900 | 1.20210 | 0.26501 |
The API is heavily inspired by the Python script that goes by the same name vim-profiler.
A few other notable vim profiling tools include: