diff options
| author | ruki <[email protected]> | 2023-03-17 22:36:01 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2023-03-17 22:36:01 +0800 |
| commit | 102d82df48e78f2bc0ef9d8650956c57504a3f1f (patch) | |
| tree | 2e4d5096e0eac0b3ce398393f62dcb95dc9aa728 /xmake/core/sandbox/modules/import/lib | |
| parent | 4d78fc5549b7033096812effcdc33cdb06e2abc2 (diff) | |
trace more tag
Diffstat (limited to 'xmake/core/sandbox/modules/import/lib')
| -rw-r--r-- | xmake/core/sandbox/modules/import/lib/detect/find_program.lua | 3 | ||||
| -rw-r--r-- | xmake/core/sandbox/modules/import/lib/detect/find_programver.lua | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/xmake/core/sandbox/modules/import/lib/detect/find_program.lua b/xmake/core/sandbox/modules/import/lib/detect/find_program.lua index 90dd963fb..0fedf66c7 100644 --- a/xmake/core/sandbox/modules/import/lib/detect/find_program.lua +++ b/xmake/core/sandbox/modules/import/lib/detect/find_program.lua @@ -28,6 +28,7 @@ local option = require("base/winos") local table = require("base/table") local utils = require("base/utils") local option = require("base/option") +local profiler = require("base/profiler") local project = require("project/project") local detectcache = require("cache/detectcache") local sandbox = require("sandbox/sandbox") @@ -301,7 +302,9 @@ function sandbox_lib_detect_find_program.main(name, opt) -- find executable program checking = coroutine_running and name or nil + profiler:enter("find_program", name) result = sandbox_lib_detect_find_program._find(name, paths, opt) + profiler:leave("find_program", name) checking = nil -- cache result diff --git a/xmake/core/sandbox/modules/import/lib/detect/find_programver.lua b/xmake/core/sandbox/modules/import/lib/detect/find_programver.lua index 24e6b97e0..8a048e4fa 100644 --- a/xmake/core/sandbox/modules/import/lib/detect/find_programver.lua +++ b/xmake/core/sandbox/modules/import/lib/detect/find_programver.lua @@ -28,6 +28,7 @@ local table = require("base/table") local utils = require("base/utils") local option = require("base/option") local semver = require("base/semver") +local profiler = require("base/profiler") local project = require("project/project") local detectcache = require("cache/detectcache") local sandbox = require("sandbox/sandbox") @@ -81,6 +82,7 @@ function sandbox_lib_detect_find_programver.main(program, opt) -- attempt to get version output info checking = coroutine_running and program or nil + profiler:enter("find_programver", program) local ok = false local outdata = nil local command = opt.command @@ -93,6 +95,7 @@ function sandbox_lib_detect_find_programver.main(program, opt) ok, outdata = os.iorunv(program, {command or "--version"}, {envs = opt.envs}) end checking = nil + profiler:leave("find_programver", program) -- find version info if ok and outdata and #outdata > 0 then |
