Skip to content

Commit

Permalink
Fix serialization of custom benchmark result
Browse files Browse the repository at this point in the history
  • Loading branch information
Zentrik committed Jun 20, 2024
1 parent fd2f88a commit 8c87eb9
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/serialization.jl
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ const SUPPORTED_TYPES = Dict{Symbol,Type}(
)
# n.b. Benchmark type not included here, since it is gensym'd

const CUSTOM_CONVERT_TYPES = Type[]
function _convert end
function customisable_result_recover end

function JSON.lower(x::Union{values(SUPPORTED_TYPES)...})
d = Dict{String,Any}()
Expand Down Expand Up @@ -54,8 +53,8 @@ function recover(x::Vector)
for i in 1:fc
ft = fieldtype(T, i)
fn = String(fieldname(T, i))
if ft in CUSTOM_CONVERT_TYPES
xsi = _convert(ft, fields[fn])
if fn == "customisable_result"
xsi = customisable_result_recover(fields[fn])
elseif ft <: Function
xsi = BenchmarkTools._nothing_func
elseif ft <: get(SUPPORTED_TYPES, nameof(ft), Union{})
Expand Down

0 comments on commit 8c87eb9

Please sign in to comment.