1 -module(beam_stats_sup).
3 -behaviour(supervisor).
6 -export([start_link/0]).
8 %% Supervisor callbacks
11 %% Helper macro for declaring children of supervisor
12 -define(CHILD(Type, Module),
13 {Module, {Module, start_link, []}, permanent, 5000, Type, [Module]}).
15 %% ===================================================================
17 %% ===================================================================
20 supervisor:start_link({local, ?MODULE}, ?MODULE, []).
22 %% ===================================================================
23 %% Supervisor callbacks
24 %% ===================================================================
28 [ ?CHILD(worker , beam_stats_producer)
29 , ?CHILD(supervisor , beam_stats_sup_consumers)
31 SupFlags = {one_for_one, 5, 10},
32 {ok, {SupFlags, Children}}.