Skip to content

Commit 8c87eb9

Browse files
committed
Fix serialization of custom benchmark result
1 parent fd2f88a commit 8c87eb9

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/serialization.jl

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@ const SUPPORTED_TYPES = Dict{Symbol,Type}(
1616
)
1717
# n.b. Benchmark type not included here, since it is gensym'd
1818

19-
const CUSTOM_CONVERT_TYPES = Type[]
20-
function _convert end
19+
function customisable_result_recover end
2120

2221
function JSON.lower(x::Union{values(SUPPORTED_TYPES)...})
2322
d = Dict{String,Any}()
@@ -54,8 +53,8 @@ function recover(x::Vector)
5453
for i in 1:fc
5554
ft = fieldtype(T, i)
5655
fn = String(fieldname(T, i))
57-
if ft in CUSTOM_CONVERT_TYPES
58-
xsi = _convert(ft, fields[fn])
56+
if fn == "customisable_result"
57+
xsi = customisable_result_recover(fields[fn])
5958
elseif ft <: Function
6059
xsi = BenchmarkTools._nothing_func
6160
elseif ft <: get(SUPPORTED_TYPES, nameof(ft), Union{})

0 commit comments

Comments
 (0)