Skip to content

Commit 2899f8b

Browse files
authored
fix static metadata length bug that occurs when tracking more results than there are trials (#30)
1 parent 93bac79 commit 2899f8b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/RegressionTests.jl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -353,11 +353,13 @@ function try_runbenchmarks(;
353353
# Note literal equality is fine because we use a stable sort and the order is random
354354

355355
# Make regressions
356-
occurrences = zeros(Int, length(static_metadatas))
356+
static_metatdata_length = only(unique(length.(static_metadatas)))
357+
occurrences = zeros(Int, static_metatdata_length)
358+
357359
for m in original_runtime_metadata
358360
m > 0 && (occurrences[m] += 1)
359361
end
360-
counts = zeros(Int, length(static_metadatas))
362+
counts = zeros(Int, static_metatdata_length)
361363
changes = Change[]
362364
datas_i = 0
363365
skip = 0

0 commit comments

Comments
 (0)