diff options
author | Sverker Eriksson <[email protected]> | 2018-05-18 17:59:33 +0200 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2018-06-04 16:28:47 +0200 |
commit | 1c8365272a55301609dc8c46aa49fa0ac048506e (patch) | |
tree | 1017c1e65c1953630299bffb6c5601098d2e69c0 /erts/emulator/test/system_info_SUITE.erl | |
parent | 9338ea3f9d3f7db949001a461456e8ce0339a1b5 (diff) | |
download | otp-1c8365272a55301609dc8c46aa49fa0ac048506e.tar.gz otp-1c8365272a55301609dc8c46aa49fa0ac048506e.tar.bz2 otp-1c8365272a55301609dc8c46aa49fa0ac048506e.zip |
erts: Add system_info(ets_count)
Diffstat (limited to 'erts/emulator/test/system_info_SUITE.erl')
-rw-r--r-- | erts/emulator/test/system_info_SUITE.erl | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/erts/emulator/test/system_info_SUITE.erl b/erts/emulator/test/system_info_SUITE.erl index fdf4aab24d..7309908337 100644 --- a/erts/emulator/test/system_info_SUITE.erl +++ b/erts/emulator/test/system_info_SUITE.erl @@ -37,6 +37,7 @@ -export([process_count/1, system_version/1, misc_smoke_tests/1, heap_size/1, wordsize/1, memory/1, ets_limit/1, atom_limit/1, + ets_count/1, atom_count/1]). suite() -> @@ -45,6 +46,7 @@ suite() -> all() -> [process_count, system_version, misc_smoke_tests, + ets_count, heap_size, wordsize, memory, ets_limit, atom_limit, atom_count]. %%% @@ -478,6 +480,21 @@ get_node_name(Config) -> ++ "-" ++ integer_to_list(erlang:unique_integer([positive]))). +ets_count(Config) when is_list(Config) -> + [ets_count_do([Type | Named]) + || Type <- [set, bag, duplicate_bag, ordered_set], + Named <- [[named_table], []] + ], + ok. + +ets_count_do(Opts) -> + Before = erlang:system_info(ets_count), + T = ets:new(?MODULE, Opts), + After = erlang:system_info(ets_count), + After = Before + 1, + ets:delete(T), + Before = erlang:system_info(ets_count). + %% Verify system_info(ets_limit) reflects max ETS table settings. ets_limit(Config0) when is_list(Config0) -> |