1%%
2%% %CopyrightBegin%
3%%
4%% Copyright Ericsson AB 2012-2018. All Rights Reserved.
5%%
6%% Licensed under the Apache License, Version 2.0 (the "License");
7%% you may not use this file except in compliance with the License.
8%% You may obtain a copy of the License at
9%%
10%%     http://www.apache.org/licenses/LICENSE-2.0
11%%
12%% Unless required by applicable law or agreed to in writing, software
13%% distributed under the License is distributed on an "AS IS" BASIS,
14%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15%% See the License for the specific language governing permissions and
16%% limitations under the License.
17%%
18%% %CopyrightEnd%
19%%
20
21%%
22-module(mnesia_bench_SUITE).
23-author('lukas@erix.ericsson.se').
24
25-export([init_per_testcase/2, end_per_testcase/2,
26         init_per_suite/1, end_per_suite/1,
27         init_per_group/2, end_per_group/2,
28         suite/0, all/0, groups/0]).
29
30-export([tpcb_conflict_ramcopies/1, tpcb_conflict_disk_only_copies/1]).
31
32%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
33suite() -> [{ct_hooks,[{ts_install_cth,[{nodenames,2}]}]}].
34
35
36all() ->
37    [{group,tpcb}].
38
39groups() ->
40    [{tpcb,[{repeat,2}],[tpcb_conflict_ramcopies,
41			 tpcb_conflict_disk_only_copies]}].
42
43init_per_group(_GroupName, Config) ->
44	Config.
45
46end_per_group(_GroupName, Config) ->
47	Config.
48
49init_per_suite(Config) ->
50    Config.
51
52end_per_suite(Config) ->
53    Config.
54
55init_per_testcase(_Func, Conf) ->
56    Conf.
57
58end_per_testcase(_Func, _Conf) ->
59    ok.
60
61
62%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
63
64tpcb_conflict_ramcopies(_Config) ->
65    mnesia_tpcb:conflict_benchmark(ram_copies).
66
67tpcb_conflict_disk_only_copies(_Config) ->
68    mnesia_tpcb:conflict_benchmark(disc_only_copies).
69
70
71%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
72
73
74
75
76
77