anchor.diff:      comm:send_local(DHT_Node, {get_node_details, comm:this(), [my_range]}),
       State;
   
  -on({get_node_details_response, NodeDetails} = _Msg, State) ->
  +on({get_node_details_response, NodeDetails} = _Msg, {AllNodes, Leader} = State) ->
       ?TRACE1(_Msg, State),
       case is_leader(node_details:get(NodeDetails, my_range)) of
           false -> State;
           _ ->
               % start a new timeslot and gather stats...
  -            NewRound = State#state.round + 1,
  +            NewRound = Leader#state.round + 1,
               Msg = {send_to_group_member, monitor_perf, {gather_stats, comm:this(), NewRound}},
               bulkowner:issue_bulk_owner(intervals:all(), Msg),
  -            State1 = check_timeslots(State),
  -            broadcast_values(State, State1),
  -            State1#state{round = NewRound}
  +            Leader1 = check_timeslots(Leader),
  +            broadcast_values(Leader, Leader1),
  +            {AllNodes, Leader1#state{round = NewRound}}
       end;
   
   on({gather_stats, SourcePid, Round} = _Msg, State) ->
  
positive.code:     {Sum + NewSum, Sum2 + NewSum2, Count + NewCount,
       erlang:min(Min, NewMin), erlang:max(Max, NewMax), NewHist2}.
  
  -spec check_timeslots(state()) -> state().
  check_timeslots(State = #state{perf_rr = PerfRR, perf_lh = PerfLH}) ->
      State#state{perf_rr = rrd:check_timeslot_now(PerfRR),
                  perf_lh = rrd:check_timeslot_now(PerfLH)}.
  
  -spec broadcast_values(OldState::state(), NewState::state()) -> ok.
  broadcast_values(OldState, NewState) ->
      % broadcast the latest value only if a new time slot was started
      OldPerfRR = OldState#state.perf_rr,
  
negative.code:     msg_delay:send_local(FirstDelay, self(), {bench}),
      msg_delay:send_local(get_gather_interval(), self(), {propagate}),
      Now = os:timestamp(),
      State = #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)},
      {State, State}.
  
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  % Miscellaneous
  