anchor.diff:      FirstDelay = randoms:rand_uniform(1, get_bench_interval() + 1),
       msg_delay:send_local(FirstDelay, self(), {bench}),
       msg_delay:send_local(get_gather_interval(), self(), {propagate}),
  -    {0, rrd:create(get_gather_interval() * 1000000, 60, {timing, us})}.
  +    Now = os:timestamp(),
  +    #state{perf_rr = rrd:create(get_gather_interval() * 1000000, 60, {timing, us}, Now),
  +           perf_lh = rrd:create(get_gather_interval() * 1000000, 60, {timing, count}, Now)}.
   
   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   % Miscellaneous
   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   
  --spec timing_update_fun(Time::rrd:internal_time(), Old::rrd:timing_type(T) | undefined, New::rrd:timing_type(T))
  -        -> rrd:timing_type(T) when is_subtype(T, number()).
  +-spec timing_update_fun(Time::rrd:internal_time(), Old::rrd:timing_type(T) | undefined, New::rrd:timing_type(T) | undefined)
  +        -> rrd:timing_type(T) | undefined when is_subtype(T, number()).
   timing_update_fun(_Time, undefined, New) ->
       New;
  +timing_update_fun(_Time, Old, undefined) ->
  +    Old;
   timing_update_fun(_Time, {Sum, Sum2, Count, Min, Max, Hist},
                     {NewSum, NewSum2, NewCount, NewMin, NewMax, NewHist}) ->
       NewHist2 = lists:foldl(fun({V, C}, Acc) ->
  
positive.code: 
  %% @doc Message handler when the rm_loop module is fully initialized.
  -spec on(message(), state()) -> state().
  on({bench}, State) ->
      msg_delay:send_local(get_bench_interval(), self(), {bench}),
      run_bench(),
      State;
  
  on({propagate}, State) ->
      msg_delay:send_local(get_gather_interval(), self(), {propagate}),
      DHT_Node = pid_groups:get_my(dht_node),
      comm:send_local(DHT_Node, {get_node_details, comm:this(), [my_range]}),
      State;
  
  on({get_node_details_response, NodeDetails}, State) ->
      MyRange = node_details:get(NodeDetails, my_range),
      case is_leader(MyRange) of
          false -> State;
          _ ->
              % start a new timeslot and gather stats...
              {Round, Stats} = State,
              NewRound = Round + 1,
              Msg = {send_to_group_member, monitor_perf, {gather_stats, comm:this(), NewRound}},
              bulkowner:issue_bulk_owner(intervals:all(), Msg),
              NewStats = rrd:check_timeslot_now(Stats),
              broadcast_value(Stats, NewStats, Round),
              {NewRound, NewStats}
      end;
  
  on({gather_stats, SourcePid, Round}, State) ->
      This = comm:this_with_cookie({SourcePid, Round}),
      comm:send_local(pid_groups:get_my(monitor),
                      {get_rrd, ?MODULE, "read_read", This}),
      State;
  
  on({{get_rrd_response, _Process, _Key, undefined}, _Cookie}, State) ->
      State;
  
  on({{get_rrd_response, _Process, _Key, DB}, {SourcePid, Round}}, State) ->
      DB2 = rrd:reduce_timeslots(1, DB),
      DataL = rrd:dump_with(DB2, fun(_DB, _From, _To, X) -> X end),
      case DataL of
          [Data] -> comm:send(SourcePid, {gather_stats_response, Round, Data});
          []     -> ok
      end,
      State;
  
  on({gather_stats_response, Round, Data}, {Round, Stats}) ->
      Time = rrd:get_current_time(Stats),
      {Round, rrd:add_with(Time, Data, Stats, fun timing_update_fun/3)};
  on({gather_stats_response, _Round, _Data}, State) ->
      State;
  
  on({report_value, Round, Stats}, {OldRound, OldStats}) when OldRound < Round ->
      Time = rrd:get_current_time(Stats),
      DataL = rrd:dump_with(Stats, fun(_DB, _From, _To, X) -> X end),
      NewStats = case DataL of
          [Data] -> rrd:add_with(Time, Data, OldStats, fun timing_update_fun/3);
          []     -> OldStats
      end,
      {Round, NewStats};
  
  on({report_value, _Round, _Stats}, State) ->
      State.
  
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  
negative.code: 
  -behaviour(gen_component).
  
  -include("record_helpers.hrl").
  -include("scalaris.hrl").
  
  % monitor process functions
  -export([start_link/1, init/1, on/2, check_config/0]).
  
  -record(state,
          {round   = 0                         :: non_neg_integer(),
           perf_rr = ?required(state, perf_rr) :: rrd:rrd(),
           perf_lh = ?required(state, perf_lh) :: rrd:rrd()
          }).
  
  -type state() :: #state{}.
  -type message() ::
      {bench} |
      {propagate} |
      {get_node_details_response, node_details:node_details()} |
      {gather_stats, SourcePid::comm:mypid(), Round::pos_integer()} |
      {{get_rrds_response, [{Process::atom(), Key::string(), DB::rrd:rrd() | undefined}]}, {SourcePid::comm:mypid(), Round::pos_integer()}} |
      {gather_stats_response, Round::pos_integer(), [{Process::atom(), Key::string(), Data::rrd:timing_type(number())}]} |
      {report_value, StatsOneRound::state()}.
  
  %-define(TRACE(X,Y), ct:pal(X,Y)).
  -define(TRACE(X,Y), ok).
  -define(TRACE1(Msg, State),
          ?TRACE("[ ~.0p ]~n  Msg: ~.0p~n  State: ~.0p)~n", [self(), Msg, State])).
  
  -spec run_bench() -> ok.
  run_bench() ->
  