aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2019-04-11 14:11:16 +0200
committerSverker Eriksson <[email protected]>2019-04-11 14:11:16 +0200
commita1a2f42ba77d6678a80f7234aaac00dd4f33dbca (patch)
tree5de9f97fa9e3496ce92356a55423665389691660 /lib
parent2d08555fdece828f226ac8106670ce8f67db2524 (diff)
parentd2a0de644240d5b8f7b276de7efd5a9f5aaf9a37 (diff)
downloadotp-a1a2f42ba77d6678a80f7234aaac00dd4f33dbca.tar.gz
otp-a1a2f42ba77d6678a80f7234aaac00dd4f33dbca.tar.bz2
otp-a1a2f42ba77d6678a80f7234aaac00dd4f33dbca.zip
Merge branch 'sverker/test-cuddle'
* sverker/test-cuddle: stdlib: Remove ets_SUITE:time_lookup
Diffstat (limited to 'lib')
-rw-r--r--lib/stdlib/test/ets_SUITE.erl29
1 files changed, 2 insertions, 27 deletions
diff --git a/lib/stdlib/test/ets_SUITE.erl b/lib/stdlib/test/ets_SUITE.erl
index cd32f25abd..4640b2b228 100644
--- a/lib/stdlib/test/ets_SUITE.erl
+++ b/lib/stdlib/test/ets_SUITE.erl
@@ -24,7 +24,7 @@
-export([default/1,setbag/1,badnew/1,verybadnew/1,named/1,keypos2/1,
privacy/1]).
-export([empty/1,badinsert/1]).
--export([time_lookup/1,badlookup/1,lookup_order/1]).
+-export([badlookup/1,lookup_order/1]).
-export([delete_elem/1,delete_tab/1,delete_large_tab/1,
delete_large_named_table/1,
evil_delete/1,baddelete/1,match_delete/1,table_leak/1]).
@@ -169,7 +169,7 @@ groups() ->
[default, setbag, badnew, verybadnew, named, keypos2,
privacy]},
{insert, [], [empty, badinsert]},
- {lookup, [], [time_lookup, badlookup, lookup_order]},
+ {lookup, [], [badlookup, lookup_order]},
{lookup_element, [], [lookup_element_mult]},
{delete, [],
[delete_elem, delete_tab, delete_large_tab,
@@ -3394,31 +3394,6 @@ badinsert_do(Opts) ->
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% Test lookup timing.
-time_lookup(Config) when is_list(Config) ->
- %% just for timing, really
- EtsMem = etsmem(),
- Values = repeat_for_opts_all_table_types(fun time_lookup_do/1),
- verify_etsmem(EtsMem),
- {comment,lists:flatten(io_lib:format(
- "~p ets lookups/s",[Values]))}.
-
-time_lookup_do(Opts) ->
- Tab = ets_new(foo,Opts),
- fill_tab(Tab,foo),
- ets:insert(Tab,{{a,key},foo}),
- N = 100000,
- {Time,_} = timer:tc(fun() -> time_lookup_many(N, Tab) end),
- Seconds = Time / 1000000,
- true = ets:delete(Tab),
- round(N / Seconds). % lookups/s
-
-time_lookup_many(0, _Tab) ->
- ok;
-time_lookup_many(N, Tab) ->
- ets:lookup(Tab, {a,key}),
- time_lookup_many(N-1, Tab).
-
%% Check proper return values from bad lookups in existing/non existing
%% ets tables.
badlookup(Config) when is_list(Config) ->