diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-10-21 18:03:04 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-10-21 18:03:04 +0800 |
commit | 6030fd1ac2ae14810cff7fccf85a8ab95ab42c3d (patch) | |
tree | 7fc8f86e90a25a29f88547d3df1afaa57dae660e /script/brave | |
parent | 480f2224cfbcd7c206f2853b28ae85f5acb4edad (diff) | |
download | lua-language-server-6030fd1ac2ae14810cff7fccf85a8ab95ab42c3d.zip |
多线程编译测试
Diffstat (limited to 'script/brave')
-rw-r--r-- | script/brave/work.lua | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/script/brave/work.lua b/script/brave/work.lua index 85aa193c..d62d9a79 100644 --- a/script/brave/work.lua +++ b/script/brave/work.lua @@ -40,6 +40,7 @@ brave.on('removeCaches', function (path) end) ---@class brave.param.compile +---@field uri uri ---@field text string ---@field mode string ---@field version string @@ -53,11 +54,13 @@ end) ---@param param brave.param.compile brave.on('compile', function (param) local parser = require 'parser' + local clock = os.clock() local state, err = parser.compile(param.text , param.mode , param.version , param.options ) + log.debug('compile', param.uri, 'takes:', os.clock() - clock) return { state = state, err = err, |