Closed PragTob closed 6 years ago
Seems I finally found one of the differences of poison 3 vs. poison 2.
The problem is our new percentiles that have integers as keys in the maps:
percentiles
iex(1)> Poison.encode! %{1 => "lol"} ** (Poison.EncodeError) expected string or atom key, got: 1 (poison) lib/poison/encoder.ex:188: Poison.Encoder.Map.encode_name/1 (poison) lib/poison/encoder.ex:212: anonymous fn/4 in Poison.Encoder.Map.encode/3 (poison) lib/poison/encoder.ex:214: Poison.Encoder.Map."-encode/3-lists^foldl/2-0-"/3 (poison) lib/poison/encoder.ex:214: Poison.Encoder.Map.encode/3 (poison) lib/poison.ex:41: Poison.encode!/2
vs.
iex(1)> Poison.encode! %{1 => "lol"} "{\"1\":\"lol\"}"
This should trigger in benchee_json, but right now this code is still inlined in benchee_html:
job_json = JSON.encode!(%{ statistics: scenario.run_time_statistics, run_times: scenario.run_times })
We can't switch to a newer poison version as lots of people rely on Poison < 3 in some phoenix versions etc.
Mitigation:
I think now that the benchee_json PR is merged, this can be closed, right?
Yup should be! :)
Seems I finally found one of the differences of poison 3 vs. poison 2.
The problem is our new
percentiles
that have integers as keys in the maps:vs.
This should trigger in benchee_json, but right now this code is still inlined in benchee_html:
We can't switch to a newer poison version as lots of people rely on Poison < 3 in some phoenix versions etc.
Mitigation: