diff options
Diffstat (limited to 'server/test/vm/example.lua')
-rw-r--r-- | server/test/vm/example.lua | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/server/test/vm/example.lua b/server/test/vm/example.lua index 459545fd..3e996e23 100644 --- a/server/test/vm/example.lua +++ b/server/test/vm/example.lua @@ -6,7 +6,11 @@ TEST(io.load(ROOT / 'src' / 'core' / 'vm.lua')) local function testIfExit(path) local buf = io.load(fs.path(path)) if buf then - TEST(buf) + local clock = os.clock() + for _ = 1, 10 do + TEST(buf) + end + print('基准测试耗时:', os.clock() - clock) end end -testIfExit[[D:\Github\lua\testes\constructs.lua]] +testIfExit(ROOT / 'test' / 'example' / 'vm.lua') |