|
|
@ -574,6 +574,26 @@ load2(N, List) -> |
|
|
|
utStrToBeam:load(load2, [{get, 1}], binary_to_list(LastStr)), |
|
|
|
load2(N - 1, List). |
|
|
|
|
|
|
|
etsT(Cnt, Num) -> |
|
|
|
Tab = ets:new(test, [ordered_set]), |
|
|
|
etsInsert(Num, Tab), |
|
|
|
etsT(Cnt, {50000, Num div 2}, Tab), |
|
|
|
ets:delete(Tab). |
|
|
|
|
|
|
|
etsInsert(0, _Tab) -> |
|
|
|
ok; |
|
|
|
etsInsert(N, Tab) -> |
|
|
|
ets:insert(Tab, {{rand:uniform(100000), N}, N}), |
|
|
|
etsInsert(N - 1, Tab). |
|
|
|
|
|
|
|
-include_lib("stdlib/include/ms_transform.hrl"). |
|
|
|
etsT(Cnt, Key, Tab) -> |
|
|
|
Ms = ets:fun2ms(fun({K, _V}) when Key > K -> true end), |
|
|
|
utTc:ts(Cnt, ets, select_count, [Tab, Ms]). |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lMakeList(0, Acc) -> |
|
|
|
Acc; |
|
|
|
lMakeList(Num, Acc) -> |
|
|
|