<!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 12/26/25 12:18, Sergey Kaplun wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:ce1075744ce1bb52fe6fdb7e3394b01e5ce23384.1766738771.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/series.lua | 24 ++++++++++++++++++------
 1 file changed, 18 insertions(+), 6 deletions(-)

diff --git a/perf/LuaJIT-benches/series.lua b/perf/LuaJIT-benches/series.lua
index f766cb32..56f012b7 100644
--- a/perf/LuaJIT-benches/series.lua
+++ b/perf/LuaJIT-benches/series.lua
@@ -1,3 +1,8 @@
+-- The benchmark to check the performance of FP arithmetics, power
+-- operation, and trigonometrical functions. Calculates the
+-- integrals of sin/cos functions.
+
+local bench = require("bench").new(arg)
 
 local function integrate(x0, x1, nsteps, omegan, f)
   local x, dx = x0, (x1-x0)/nsteps
@@ -26,9 +31,16 @@ local function series(n)
 end
 
 local n = tonumber(arg and arg[1]) or 10000
-local tm = os.clock()
-local t = series(n)
-tm = os.clock() - tm
-assert(math.abs(t[1]-2.87295) < 0.00001)
-io.write(string.format("size %d, %.2f s, %.1f iterations/s\n",
-                       n, tm, (2*n-1)/tm))
+
+bench:add({
+  name = "series",
+  checker = function(res)
+    return math.abs(res[1] - 2.87295) < 0.00001
+  end,
+  payload = function()
+    return series(n)
+  end,
+  items = 2 * n - 1,
+})
+
+bench:run_and_report()
</pre>
    </blockquote>
  </body>
  <lt-container></lt-container>
</html>