diff options
Diffstat (limited to 'lib/stdlib/test')
-rw-r--r-- | lib/stdlib/test/ets_SUITE.erl | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/lib/stdlib/test/ets_SUITE.erl b/lib/stdlib/test/ets_SUITE.erl index ac68fdcc34..a7fe213f40 100644 --- a/lib/stdlib/test/ets_SUITE.erl +++ b/lib/stdlib/test/ets_SUITE.erl @@ -5284,7 +5284,7 @@ meta_lookup_unnamed_read(Config) when is_list(Config) -> end, FiniF = fun(Tab) -> true = ets:delete(Tab) end, - run_workers(InitF,ExecF,FiniF,10000). + run_smp_workers(InitF,ExecF,FiniF,10000). meta_lookup_unnamed_write(Config) when is_list(Config) -> InitF = fun(_) -> Tab = ets_new(unnamed,[]), @@ -5295,7 +5295,7 @@ meta_lookup_unnamed_write(Config) when is_list(Config) -> end, FiniF = fun({Tab,_}) -> true = ets:delete(Tab) end, - run_workers(InitF,ExecF,FiniF,10000). + run_smp_workers(InitF,ExecF,FiniF,10000). meta_lookup_named_read(Config) when is_list(Config) -> InitF = fun([ProcN|_]) -> Name = list_to_atom(integer_to_list(ProcN)), @@ -5308,7 +5308,7 @@ meta_lookup_named_read(Config) when is_list(Config) -> end, FiniF = fun(Tab) -> true = ets:delete(Tab) end, - run_workers(InitF,ExecF,FiniF,10000). + run_smp_workers(InitF,ExecF,FiniF,10000). meta_lookup_named_write(Config) when is_list(Config) -> InitF = fun([ProcN|_]) -> Name = list_to_atom(integer_to_list(ProcN)), @@ -5320,7 +5320,7 @@ meta_lookup_named_write(Config) when is_list(Config) -> end, FiniF = fun({Tab,_}) -> true = ets:delete(Tab) end, - run_workers(InitF,ExecF,FiniF,10000). + run_smp_workers(InitF,ExecF,FiniF,10000). meta_newdel_unnamed(Config) when is_list(Config) -> InitF = fun(_) -> ok end, @@ -5328,7 +5328,7 @@ meta_newdel_unnamed(Config) when is_list(Config) -> true = ets:delete(Tab) end, FiniF = fun(_) -> ok end, - run_workers(InitF,ExecF,FiniF,10000). + run_smp_workers(InitF,ExecF,FiniF,10000). meta_newdel_named(Config) when is_list(Config) -> InitF = fun([ProcN|_]) -> list_to_atom(integer_to_list(ProcN)) @@ -5338,7 +5338,7 @@ meta_newdel_named(Config) when is_list(Config) -> Name end, FiniF = fun(_) -> ok end, - run_workers(InitF,ExecF,FiniF,10000). + run_smp_workers(InitF,ExecF,FiniF,10000). %% Concurrent insert's on same table. smp_insert(Config) when is_list(Config) -> @@ -5347,7 +5347,7 @@ smp_insert(Config) when is_list(Config) -> ExecF = fun(_) -> true = ets:insert(smp_insert,{rand:uniform(10000)}) end, FiniF = fun(_) -> ok end, - run_workers(InitF,ExecF,FiniF,100000), + run_smp_workers(InitF,ExecF,FiniF,100000), verify_table_load(smp_insert), ets:delete(smp_insert). @@ -5370,7 +5370,7 @@ smp_fixed_delete_do() -> {Key+Increment,Increment} end, FiniF = fun(_) -> ok end, - run_workers_do(InitF,ExecF,FiniF,NumOfObjs), + run_sched_workers(InitF,ExecF,FiniF,NumOfObjs), 0 = ets:info(T,size), true = ets:info(T,fixed), Buckets = num_of_buckets(T), @@ -5611,7 +5611,7 @@ smp_select_delete(Config) when is_list(Config) -> end end, FiniF = fun(Result) -> Result end, - Results = run_workers_do(InitF,ExecF,FiniF,20000), + Results = run_sched_workers(InitF,ExecF,FiniF,20000), TotCnts = lists:foldl(fun(Diffs, Sum) -> add_lists(Sum,tuple_to_list(Diffs)) end, lists:duplicate(Mod, 0), Results), io:format("TotCnts = ~p\n",[TotCnts]), @@ -5662,7 +5662,7 @@ smp_select_replace(Config) when is_list(Config) -> State end, FiniF = fun (State) -> State end, - run_workers_do(InitF, ExecF, FiniF, WorkerCount), + run_sched_workers(InitF, ExecF, FiniF, WorkerCount), FinalCounts = ets:select(T, [{{'_', '$1'}, [], ['$1']}]), TotalIterations = WorkerCount * CounterIterations * erlang:system_info(schedulers), TotalIterations = lists:sum(FinalCounts), @@ -5734,7 +5734,7 @@ otp_9423(Config) when is_list(Config) -> end end, FiniF = fun(R) -> R end, - case run_workers(InitF, ExecF, FiniF, infinite, 1) of + case run_smp_workers(InitF, ExecF, FiniF, infinite, 1) of Pids when is_list(Pids) -> %%[P ! start || P <- Pids], repeat(fun() -> ets:new(otp_9423, [named_table, public, {write_concurrency,true}]), @@ -5886,9 +5886,9 @@ add_lists([],[],Acc) -> add_lists([E1|T1], [E2|T2], Acc) -> add_lists(T1, T2, [E1+E2 | Acc]). -run_workers(InitF,ExecF,FiniF,Laps) -> - run_workers(InitF,ExecF,FiniF,Laps, 0). -run_workers(InitF,ExecF,FiniF,Laps, Exclude) -> +run_smp_workers(InitF,ExecF,FiniF,Laps) -> + run_smp_workers(InitF,ExecF,FiniF,Laps, 0). +run_smp_workers(InitF,ExecF,FiniF,Laps, Exclude) -> case erlang:system_info(smp_support) of true -> run_workers_do(InitF,ExecF,FiniF,Laps, Exclude); @@ -5896,7 +5896,7 @@ run_workers(InitF,ExecF,FiniF,Laps, Exclude) -> {skipped,"No smp support"} end. -run_workers_do(InitF,ExecF,FiniF,Laps) -> +run_sched_workers(InitF,ExecF,FiniF,Laps) -> run_workers_do(InitF,ExecF,FiniF,Laps, 0). run_workers_do(InitF,ExecF,FiniF,Laps, Exclude) -> NumOfProcs = case erlang:system_info(schedulers) of |