Benchmarks page sometime goes blank while browsing result
Here is the error that pops up in the console when that happens.
vendor.bb0c18a4.js:23 Uncaught
{RE_EXN_ID: 'Invalid_argument', _1: 'index out of bounds', Error: Error
at Xf (https://bench.ci.dev/assets/vendor.bb0c18a4.js:32:118954)
at https://bench.ci.…}
Error
:
Error at Xf (https://bench.ci.dev/assets/vendor.bb0c18a4.js:32:118954) at https://bench.ci.dev/assets/index.253f21e9.js:1:85390 at https://bench.ci.dev/assets/vendor.bb0c18a4.js:32:141758 at dp (https://bench.ci.dev/assets/vendor.bb0c18a4.js:32:141775) at https://bench.ci.dev/assets/index.253f21e9.js:1:85365 at https://bench.ci.dev/assets/vendor.bb0c18a4.js:32:141758 at dp (https://bench.ci.dev/assets/vendor.bb0c18a4.js:32:141775) at Hl (https://bench.ci.dev/assets/index.253f21e9.js:1:85322) at https://bench.ci.dev/assets/index.253f21e9.js:1:88427 at cf (https://bench.ci.dev/assets/vendor.bb0c18a4.js:32:104569)
RE_EXN_ID
:
"Invalid_argument"
_1
:
"index out of bounds"
It currently happens while browsing down in https://bench.ci.dev/ocsigen/js_of_ocaml/branch/master/benchmark/Js_of_ocaml?worker=autumn&image=bench.Dockerfile. The behavior appears and disappears as new commits are pushed.
Thanks for reporting the issue, @hhugo and apologies for the trouble! I'll try to take a look at it in the next week or so.
The code seems to be written in rescript, is it available publicly ?
The code seems to be written in rescript, is it available publicly ?
Yes, this (https://github.com/ocurrent/current-bench/) is the repository where the code lives. It's not the prettiest code, though...
The page mentioned above now always goes blank when trying to display the "Fiat-Crypto" section. If I fold it, I can see the rest of the page.
I think the issue is in makeDygraphData
let n = data->Belt.Array.get(0)->Belt.Option.getWithDefault([])->Belt.Array.length
// Data passed onto Dygraph looks like array<[idx, value1, value2, ..., stats1, stats2, ...]>
Belt.Array.range(0, n - 1)->Belt.Array.map(idx =>
Belt.Array.concatMany([[Obj.magic(idx)], data->Belt.Array.map(d => d[idx]), nullConstantSeries])
The code assumes that elements of data all have the same size.
In my problematic case, I have something like
[Array(81), Array(81), Array(80), Array(80), Array(81), Array(81), Array(81), Array(81), Array(81), Array(81), Array(81), Array(81), Array(81), Array(80), Array(80), Array(81), Array(81), Array(81), Array(81), Array(80), Array(81), Array(81)]
We try to access the 80th element of all elements with data->Belt.Array.map(d => d[idx]) which fail with Invalid_argument.