<!DOCTYPE html>
<html data-lt-installed="true">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body style="padding-bottom: 1px;">
    <p>Hi, Sergey!</p>
    <p>thanks for the patch! LGTM</p>
    <p>Sergey</p>
    <div class="moz-cite-prefix">On 10/24/25 13:50, Sergey Kaplun wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:f3492c5f8bb237f8cb40b7fad1c43423b0f41970.1761301736.git.skaplun@tarantool.org">
      <pre wrap="" class="moz-quote-pre">This patch adjusts the aforementioned test to use the benchmark
framework introduced before. The default arguments are adjusted
according to the <PARAM_x86.txt> file. The arguments to the script still
can be provided in the command line run.
---
 perf/LuaJIT-benches/chameneos.lua | 32 ++++++++++++++++++++++---------
 1 file changed, 23 insertions(+), 9 deletions(-)

diff --git a/perf/LuaJIT-benches/chameneos.lua b/perf/LuaJIT-benches/chameneos.lua
index 78b64c3f..c1002041 100644
--- a/perf/LuaJIT-benches/chameneos.lua
+++ b/perf/LuaJIT-benches/chameneos.lua
@@ -1,8 +1,10 @@
+local bench = require("bench").new(arg)
 
 local co = coroutine
 local create, resume, yield = co.create, co.resume, co.yield
 
-local N = tonumber(arg and arg[1]) or 10
+local N = tonumber(arg and arg[1]) or 1e7</pre>
    </blockquote>
    Why 1e7?
    <blockquote type="cite"
cite="mid:f3492c5f8bb237f8cb40b7fad1c43423b0f41970.1761301736.git.skaplun@tarantool.org">
      <pre wrap="" class="moz-quote-pre">
+local N_ATTEMPTS = N
 local first, second
 
 -- Meet another creature.
@@ -57,12 +59,24 @@ local function schedule(threads)
   until false
 end
 
--- A bunch of colorful creatures.
-local threads = {
-  creature("blue"),
-  creature("red"),
-  creature("yellow"),
-  creature("blue"),
-}
+bench:add({
+  name = "chameneos",
+  items = N_ATTEMPTS,
+  checker = function(meetings) return meetings == N_ATTEMPTS * 2 end,
+  payload = function()
+    -- A bunch of colorful creatures.
+    local threads = {
+      creature("blue"),
+      creature("red"),
+      creature("yellow"),
+      creature("blue"),
+    }
 
-io.write(schedule(threads), "\n")
+    local meetings = schedule(threads)
+    -- XXX: Restore meetings for the next iteration.
+    N = N_ATTEMPTS
+    return meetings
+  end,
+})
+
+bench:run_and_report()
</pre>
    </blockquote>
  </body>
  <lt-container></lt-container>
</html>