aboutsummaryrefslogtreecommitdiffstats
path: root/lib/mnesia/test/mnesia_measure_test.erl
diff options
context:
space:
mode:
authorLukas Larsson <[email protected]>2011-02-17 18:35:19 +0100
committerLukas Larsson <[email protected]>2011-02-17 18:35:19 +0100
commit08cec89bb1e781157a75c13e72562258b271b469 (patch)
tree5510a4dc013125fed6a4c4804cff68e489a0b1a2 /lib/mnesia/test/mnesia_measure_test.erl
parent62e3328272e3bac139e765e6a5147daca02ec833 (diff)
parenta6092e8eeccbd7a24943d53592e8085a20efb1ce (diff)
downloadotp-08cec89bb1e781157a75c13e72562258b271b469.tar.gz
otp-08cec89bb1e781157a75c13e72562258b271b469.tar.bz2
otp-08cec89bb1e781157a75c13e72562258b271b469.zip
Merge branch 'lukas/converted_test_suites/OTP-8768' into dev
* lukas/converted_test_suites/OTP-8768: (102 commits) Update ipv6 testcase to be skipped if no ipv6 hosts are defined Update ftp suite to take config from ct:get_config Update gethostname test cases for v6 to use the v6 hosts instead of v4 Rename Suite Callback to Common Test Hook Strip ts.config of internal addresses. Update ssl orber tests to be skipped if there is no ssl installed Update init_per_suite to skip all tests if crypto does not exist Update so that count_children_memory is skipped on +Meamin emulators Update so that tests are skipped if odbc:connect fails Update end_per_suite so that it does not crash on non-smp emulators Update init_per_testcase to kill all slaves when called. This is to prevent testcases which fail to before to chain with the ones run after. Update and add cover spec files to work with common_test Update all test specs Fix formatting for emulator Fix formatting for epmd Fix formatting for system Fix formatting for wx Fix formatting for tools Fix formatting for syntax_tools Fix formatting for stdlib ...
Diffstat (limited to 'lib/mnesia/test/mnesia_measure_test.erl')
-rw-r--r--lib/mnesia/test/mnesia_measure_test.erl149
1 files changed, 49 insertions, 100 deletions
diff --git a/lib/mnesia/test/mnesia_measure_test.erl b/lib/mnesia/test/mnesia_measure_test.erl
index fbf804dbec..e63689d83a 100644
--- a/lib/mnesia/test/mnesia_measure_test.erl
+++ b/lib/mnesia/test/mnesia_measure_test.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2009. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2010. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -27,8 +27,8 @@
init_per_testcase(Func, Conf) ->
mnesia_test_lib:init_per_testcase(Func, Conf).
-fin_per_testcase(Func, Conf) ->
- mnesia_test_lib:fin_per_testcase(Func, Conf).
+end_per_testcase(Func, Conf) ->
+ mnesia_test_lib:end_per_testcase(Func, Conf).
-define(init(N, Config),
mnesia_test_lib:prepare_test_case([{init_test_case, [mnesia]},
@@ -37,101 +37,62 @@ fin_per_testcase(Func, Conf) ->
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-all(doc) ->
- ["Measure various aspects of Mnesia",
- "Verify that Mnesia has predictable response times,",
- "that the transaction system has fair algoritms,",
- "resource consumption, scalabilitym system limits etc.",
- "Perform some benchmarks."];
-all(suite) ->
- [
- prediction,
- consumption,
- scalability,
- benchmarks
- ].
+all() ->
+ [{group, prediction}, {group, consumption},
+ {group, scalability}, {group, benchmarks}].
+
+groups() ->
+ [{prediction, [],
+ [reader_disturbed_by_node_down,
+ writer_disturbed_by_node_down,
+ reader_disturbed_by_node_up,
+ writer_disturbed_by_node_up,
+ reader_disturbed_by_schema_ops,
+ writer_disturbed_by_schema_ops,
+ reader_disturbed_by_checkpoint,
+ writer_disturbed_by_checkpoint,
+ reader_disturbed_by_dump_log,
+ writer_disturbed_by_dump_log,
+ reader_disturbed_by_backup, writer_disturbed_by_backup,
+ reader_disturbed_by_restore,
+ writer_disturbed_by_restore, {group, fairness}]},
+ {fairness, [],
+ [reader_competing_with_reader,
+ reader_competing_with_writer,
+ writer_competing_with_reader,
+ writer_competing_with_writer]},
+ {consumption, [],
+ [measure_resource_consumption,
+ determine_resource_leakage]},
+ {scalability, [],
+ [determine_system_limits, performance_at_min_config,
+ performance_at_max_config, performance_at_full_load,
+ resource_consumption_at_min_config,
+ resource_consumption_at_max_config,
+ resource_consumption_at_full_load]},
+ {benchmarks, [],
+ [{group, meter}, cost, dbn_meters,
+ measure_all_api_functions, {group, tpcb},
+ mnemosyne_vs_mnesia_kernel]},
+ {tpcb, [], [ram_tpcb, disc_tpcb, disc_only_tpcb]},
+ {meter, [], [ram_meter, disc_meter, disc_only_meter]}].
+
+init_per_group(_GroupName, Config) ->
+ Config.
+
+end_per_group(_GroupName, Config) ->
+ Config.
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-prediction(doc) ->
- ["The system must have predictable response times.",
- "The maintenance of the system should not impact on the",
- "availability. Make sure that the response times does not vary too",
- "much from the undisturbed normal usage.",
- "Verify that deadlocks never occurs."];
-prediction(suite) ->
- [
- reader_disturbed_by_node_down,
- writer_disturbed_by_node_down,
- reader_disturbed_by_node_up,
- writer_disturbed_by_node_up,
- reader_disturbed_by_schema_ops,
- writer_disturbed_by_schema_ops,
- reader_disturbed_by_checkpoint,
- writer_disturbed_by_checkpoint,
- reader_disturbed_by_dump_log,
- writer_disturbed_by_dump_log,
- reader_disturbed_by_backup,
- writer_disturbed_by_backup,
- reader_disturbed_by_restore,
- writer_disturbed_by_restore,
- fairness
- ].
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-fairness(doc) ->
- ["Verify that the transaction system behaves fair, even under intense",
- "stress. Combine different access patterns (transaction profiles)",
- "in order to verify that concurrent applications gets a fair share",
- "of the database resource. Verify that starvation never may occur."];
-fairness(suite) ->
- [
- reader_competing_with_reader,
- reader_competing_with_writer,
- writer_competing_with_reader,
- writer_competing_with_writer
- ].
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-consumption(doc) ->
- ["Measure the resource consumption and publish the outcome. Make",
- "sure that resources are released after failures."];
-consumption(suite) ->
- [
- measure_resource_consumption,
- determine_resource_leakage
- ].
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-scalability(doc) ->
- ["Try out where the system limits are. We must at least meet the",
- "documented system limits.",
- "Redo the performance meters for various configurations and load,",
- "especially near system limits."];
-scalability(suite) ->
- [
- determine_system_limits,
- performance_at_min_config,
- performance_at_max_config,
- performance_at_full_load,
- resource_consumption_at_min_config,
- resource_consumption_at_max_config,
- resource_consumption_at_full_load
- ].
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-benchmarks(doc) ->
- ["Measure typical database operations and publish them. Try to",
- "verify that new releases of Mnesia always outperforms old",
- "releases, or at least that the meters does not get worse."];
-benchmarks(suite) ->
- [
- meter,
- cost,
- dbn_meters,
- measure_all_api_functions,
- tpcb,
- mnemosyne_vs_mnesia_kernel
- ].
dbn_meters(suite) -> [];
dbn_meters(Config) when is_list(Config) ->
@@ -139,12 +100,6 @@ dbn_meters(Config) when is_list(Config) ->
?match(ok, mnesia_dbn_meters:start()),
ok.
-tpcb(suite) ->
- [
- ram_tpcb,
- disc_tpcb,
- disc_only_tpcb
- ].
tpcb(ReplicaType, Config) ->
HarakiriDelay = {tc_timeout, timer:minutes(20)},
@@ -171,12 +126,6 @@ disc_only_tpcb(suite) -> [];
disc_only_tpcb(Config) when is_list(Config) ->
tpcb(disc_only_copies, Config).
-meter(suite) ->
- [
- ram_meter,
- disc_meter,
- disc_only_meter
- ].
ram_meter(suite) -> [];
ram_meter(Config) when is_list(Config) ->