~clint-fewbar/ubuntu/precise/erlang/merge-15b

« back to all changes in this revision

Viewing changes to lib/mnesia/test/mnesia_measure_test.erl

  • Committer: Package Import Robot
  • Author(s): Sergei Golovan
  • Date: 2011-12-15 19:20:10 UTC
  • mfrom: (1.1.18) (3.5.15 sid)
  • mto: (3.5.16 sid)
  • mto: This revision was merged to the branch mainline in revision 33.
  • Revision ID: package-import@ubuntu.com-20111215192010-jnxcfe3tbrpp0big
Tags: 1:15.b-dfsg-1
* New upstream release.
* Upload to experimental because this release breaks external drivers
  API along with ABI, so several applications are to be fixed.
* Removed SSL patch because the old SSL implementation is removed from
  the upstream distribution.
* Removed never used patch which added native code to erlang beam files.
* Removed the erlang-docbuilder binary package because the docbuilder
  application was dropped by upstream.
* Documented dropping ${erlang-docbuilder:Depends} substvar in
  erlang-depends(1) manpage.
* Made erlang-base and erlang-base-hipe provide virtual package
  erlang-abi-15.b (the number means the first erlang version, which
  provides current ABI).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
%%
2
2
%% %CopyrightBegin%
3
3
%% 
4
 
%% Copyright Ericsson AB 1996-2009. All Rights Reserved.
 
4
%% Copyright Ericsson AB 1996-2010. All Rights Reserved.
5
5
%% 
6
6
%% The contents of this file are subject to the Erlang Public License,
7
7
%% Version 1.1, (the "License"); you may not use this file except in
27
27
init_per_testcase(Func, Conf) ->
28
28
    mnesia_test_lib:init_per_testcase(Func, Conf).
29
29
 
30
 
fin_per_testcase(Func, Conf) ->
31
 
    mnesia_test_lib:fin_per_testcase(Func, Conf).
 
30
end_per_testcase(Func, Conf) ->
 
31
    mnesia_test_lib:end_per_testcase(Func, Conf).
32
32
 
33
33
-define(init(N, Config),
34
34
        mnesia_test_lib:prepare_test_case([{init_test_case, [mnesia]},
37
37
 
38
38
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
39
39
 
40
 
all(doc) ->
41
 
    ["Measure various aspects of Mnesia",
42
 
     "Verify that Mnesia has predictable response times,",
43
 
     "that the transaction system has fair algoritms,",
44
 
     "resource consumption, scalabilitym system limits etc.",
45
 
     "Perform some benchmarks."];
46
 
all(suite) ->
47
 
    [
48
 
     prediction,
49
 
     consumption,
50
 
     scalability,
51
 
     benchmarks
52
 
    ].
 
40
all() -> 
 
41
    [{group, prediction}, {group, consumption},
 
42
     {group, scalability}, {group, benchmarks}].
 
43
 
 
44
groups() -> 
 
45
    [{prediction, [],
 
46
      [reader_disturbed_by_node_down,
 
47
       writer_disturbed_by_node_down,
 
48
       reader_disturbed_by_node_up,
 
49
       writer_disturbed_by_node_up,
 
50
       reader_disturbed_by_schema_ops,
 
51
       writer_disturbed_by_schema_ops,
 
52
       reader_disturbed_by_checkpoint,
 
53
       writer_disturbed_by_checkpoint,
 
54
       reader_disturbed_by_dump_log,
 
55
       writer_disturbed_by_dump_log,
 
56
       reader_disturbed_by_backup, writer_disturbed_by_backup,
 
57
       reader_disturbed_by_restore,
 
58
       writer_disturbed_by_restore, {group, fairness}]},
 
59
     {fairness, [],
 
60
      [reader_competing_with_reader,
 
61
       reader_competing_with_writer,
 
62
       writer_competing_with_reader,
 
63
       writer_competing_with_writer]},
 
64
     {consumption, [],
 
65
      [measure_resource_consumption,
 
66
       determine_resource_leakage]},
 
67
     {scalability, [],
 
68
      [determine_system_limits, performance_at_min_config,
 
69
       performance_at_max_config, performance_at_full_load,
 
70
       resource_consumption_at_min_config,
 
71
       resource_consumption_at_max_config,
 
72
       resource_consumption_at_full_load]},
 
73
     {benchmarks, [],
 
74
      [{group, meter}, cost, dbn_meters,
 
75
       measure_all_api_functions, {group, tpcb},
 
76
       mnemosyne_vs_mnesia_kernel]},
 
77
     {tpcb, [], [ram_tpcb, disc_tpcb, disc_only_tpcb]},
 
78
     {meter, [], [ram_meter, disc_meter, disc_only_meter]}].
 
79
 
 
80
init_per_group(_GroupName, Config) ->
 
81
    Config.
 
82
 
 
83
end_per_group(_GroupName, Config) ->
 
84
    Config.
 
85
 
53
86
     
54
87
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
55
 
prediction(doc) ->
56
 
    ["The system must have predictable response times.",
57
 
     "The maintenance of the system should not impact on the",
58
 
     "availability. Make sure that the response times does not vary too",
59
 
     "much from the undisturbed normal usage.",
60
 
     "Verify that deadlocks never occurs."];
61
 
prediction(suite) ->
62
 
    [
63
 
     reader_disturbed_by_node_down,
64
 
     writer_disturbed_by_node_down,
65
 
     reader_disturbed_by_node_up,
66
 
     writer_disturbed_by_node_up,
67
 
     reader_disturbed_by_schema_ops,
68
 
     writer_disturbed_by_schema_ops,
69
 
     reader_disturbed_by_checkpoint,
70
 
     writer_disturbed_by_checkpoint,
71
 
     reader_disturbed_by_dump_log,
72
 
     writer_disturbed_by_dump_log,
73
 
     reader_disturbed_by_backup,
74
 
     writer_disturbed_by_backup,
75
 
     reader_disturbed_by_restore,
76
 
     writer_disturbed_by_restore,
77
 
     fairness
78
 
    ].
79
 
 
80
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
81
 
fairness(doc) ->
82
 
    ["Verify that the transaction system behaves fair, even under intense",
83
 
     "stress. Combine different access patterns (transaction profiles)",
84
 
     "in order to verify that concurrent applications gets a fair share",
85
 
     "of the database resource. Verify that starvation never may occur."];
86
 
fairness(suite) ->
87
 
    [
88
 
     reader_competing_with_reader,
89
 
     reader_competing_with_writer,
90
 
     writer_competing_with_reader,
91
 
     writer_competing_with_writer
92
 
    ].
93
 
 
94
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
95
 
consumption(doc) ->
96
 
    ["Measure the resource consumption and publish the outcome. Make",
97
 
     "sure that resources are released after failures."];
98
 
consumption(suite) ->
99
 
    [
100
 
     measure_resource_consumption,
101
 
     determine_resource_leakage
102
 
    ].
103
 
 
104
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
105
 
scalability(doc) ->
106
 
    ["Try out where the system limits are. We must at least meet the",
107
 
     "documented system limits.",
108
 
     "Redo the performance meters for various configurations and load,",
109
 
     "especially near system limits."];
110
 
scalability(suite) ->
111
 
    [
112
 
     determine_system_limits,
113
 
     performance_at_min_config,
114
 
     performance_at_max_config,
115
 
     performance_at_full_load,
116
 
     resource_consumption_at_min_config,
117
 
     resource_consumption_at_max_config,
118
 
     resource_consumption_at_full_load
119
 
    ].
120
 
 
121
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
122
 
benchmarks(doc) ->
123
 
    ["Measure typical database operations and publish them. Try to",
124
 
     "verify that new releases of Mnesia always outperforms old",
125
 
     "releases, or at least that the meters does not get worse."];
126
 
benchmarks(suite) ->
127
 
    [
128
 
     meter,
129
 
     cost,
130
 
     dbn_meters,
131
 
     measure_all_api_functions,
132
 
     tpcb,
133
 
     mnemosyne_vs_mnesia_kernel
134
 
    ].
 
88
 
 
89
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
90
 
 
91
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
92
 
 
93
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
94
 
 
95
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
135
96
 
136
97
dbn_meters(suite) -> [];
137
98
dbn_meters(Config) when is_list(Config) ->
139
100
    ?match(ok, mnesia_dbn_meters:start()),
140
101
    ok.
141
102
 
142
 
tpcb(suite) ->
143
 
    [
144
 
     ram_tpcb,
145
 
     disc_tpcb,
146
 
     disc_only_tpcb
147
 
    ].
148
103
 
149
104
tpcb(ReplicaType, Config) ->
150
105
    HarakiriDelay = {tc_timeout, timer:minutes(20)},
171
126
disc_only_tpcb(Config) when is_list(Config) ->
172
127
    tpcb(disc_only_copies, Config).
173
128
 
174
 
meter(suite) ->
175
 
    [
176
 
     ram_meter,
177
 
     disc_meter,
178
 
     disc_only_meter
179
 
    ].
180
129
 
181
130
ram_meter(suite) -> [];
182
131
ram_meter(Config) when is_list(Config) ->