From fb1db80f5ab707e188be3c60539fa38eaf996f24 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Thu, 2 Mar 2023 14:42:15 +0800 Subject: test(treesitter/parser_spec): correct time unit (#22471) --- test/functional/treesitter/parser_spec.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/functional/treesitter/parser_spec.lua b/test/functional/treesitter/parser_spec.lua index 67aad4d1b7..fd9822d1c0 100644 --- a/test/functional/treesitter/parser_spec.lua +++ b/test/functional/treesitter/parser_spec.lua @@ -182,9 +182,9 @@ void ui_refresh(void) local firstrun = q(1) local manyruns = q(100) - local factor = is_os('win') and 3 or 4 - -- First run should be at least 4x slower. - assert(factor * 100 * manyruns < firstrun, ('firstrun: %d ms, manyruns: %d ms'):format(firstrun / 1000, manyruns / 1000)) + -- First run should be at least 400x slower than an 100 subsequent runs. + local factor = is_os('win') and 300 or 400 + assert(factor * manyruns < firstrun, ('firstrun: %f ms, manyruns: %f ms'):format(firstrun / 1e6, manyruns / 1e6)) end) it('support query and iter by capture', function() -- cgit