fix: fix benchmarks report conversion to BMF format
authorJérôme Benoit <jerome.benoit@piment-noir.org>
Wed, 2 Oct 2024 08:57:44 +0000 (10:57 +0200)
committerJérôme Benoit <jerome.benoit@piment-noir.org>
Wed, 2 Oct 2024 08:57:44 +0000 (10:57 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
benchmarks/benchmarks-utils.mjs

index a45d953ece805b43dab2749a8a20a6efc62ce1cc..457e197a634b46f50599841ad6b52775707ed83f 100644 (file)
@@ -149,7 +149,15 @@ export const convertTatamiNgToBmf = report => {
             value: stats?.avg,
           },
           throughput: {
-            value: stats?.iter,
+            value: stats?.iters,
+            ...(typeof stats?.max === 'number' &&
+              stats.max > 0 && {
+              lower_value: 1e9 / stats.max,
+            }),
+            ...(typeof stats?.min === 'number' &&
+              stats.min > 0 && {
+              upper_value: 1e9 / stats.min,
+            }),
           },
         },
       }