diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2018-04-24 00:27:09 +0200 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2018-04-24 00:44:06 +0200 |
commit | 77cb14cc6da5dff685c6e5a4005da433c39d5ff7 (patch) | |
tree | 4c3af7879d5cbef319e7df61c4c336eb1e0acee8 /src/nvim/api/vim.c | |
parent | 32f3937477e05b13e05bba4463c5cfd417a2fde8 (diff) | |
download | rneovim-77cb14cc6da5dff685c6e5a4005da433c39d5ff7.tar.gz rneovim-77cb14cc6da5dff685c6e5a4005da433c39d5ff7.tar.bz2 rneovim-77cb14cc6da5dff685c6e5a4005da433c39d5ff7.zip |
API: nvim__stats()
Use it to verify fsync() behavior.
Diffstat (limited to 'src/nvim/api/vim.c')
-rw-r--r-- | src/nvim/api/vim.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/nvim/api/vim.c b/src/nvim/api/vim.c index 07ec6e8c27..64fe1359c6 100644 --- a/src/nvim/api/vim.c +++ b/src/nvim/api/vim.c @@ -1473,6 +1473,17 @@ Float nvim__id_float(Float flt) return flt; } +/// Gets internal stats. +/// +/// @return Map of various internal stats. +Dictionary nvim__stats(void) +{ + Dictionary rv = ARRAY_DICT_INIT; + PUT(rv, "fsync", INTEGER_OBJ(g_stats.fsync)); + PUT(rv, "redraw", INTEGER_OBJ(g_stats.redraw)); + return rv; +} + /// Gets a list of dictionaries representing attached UIs. /// /// @return Array of UI dictionaries |