Skip to content

Commit

Permalink
Merge PR-7971 from Maria-12648430/fix_ets_suite_warnings
Browse files Browse the repository at this point in the history
Fix warnings in `ets` test suite
  • Loading branch information
sverker authored Dec 20, 2023
2 parents aaa9971 + f79f2ee commit 2bcabe9
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions lib/stdlib/test/ets_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -281,14 +281,11 @@ end_per_group(benchmark, Config) ->
EtsProcess = proplists:get_value(ets_benchmark_result_summary_tab_process, Config),
Report =
fun(NOfBenchmarksCtr, TotThroughputCtr, Name) ->
Average =
case {ets:lookup_element(T, TotThroughputCtr, 2),
ets:lookup_element(T, NOfBenchmarksCtr, 2)} of
{0.0, 0.0} ->
0;
{TotThrp, NBench} ->
TotThrp / NBench
end,
NBench = ets:lookup_element(T, NOfBenchmarksCtr, 2),
Average = if
NBench == 0 -> 0;
true -> ets:lookup_element(T, TotThroughputCtr, 2) / NBench
end,
io:format("~p ~p~n", [Name, Average]),
ct_event:notify(
#event{name = benchmark_data,
Expand Down Expand Up @@ -4380,7 +4377,7 @@ lem_data() ->

lem_crash(T) ->
L = ets:lookup_element(T, 'eddie2@boromir', 3),
{erlang:phash(L, 256), L}.
{erlang:phash2(L, 256), L}.

lem_crash_3(T) ->
lem_crash(T),
Expand Down

0 comments on commit 2bcabe9

Please sign in to comment.