anchor.diff:  init([]) ->
       {ok, #state{vnode_gets=spiraltime:fresh(),
                   vnode_puts=spiraltime:fresh(),
  +                vnode_gets_total=0,
  +                vnode_puts_total=0,
  +                node_gets_total=0,
  +                node_puts_total=0,
                   get_fsm_time=slide:fresh(),
                   put_fsm_time=slide:fresh()}}.
   
  
positive.code: 
  %% @spec vnode_stats(integer(), state()) -> proplist()
  %% @doc Get the vnode-sum stats proplist.
  vnode_stats(Moment, State) ->
      [{F, spiral_minute(Moment, Elt, State)}
       || {F, Elt} <- [{vnode_gets, #state.vnode_gets},
                       {vnode_puts, #state.vnode_puts}]].
  
  %% @spec node_stats(integer(), state()) -> proplist()
  %% @doc Get the node stats proplist.
  node_stats(Moment, State) ->
      {Gets, GetMean, {GetMedian, GetNF, GetNN, GetH}} =
          slide_minute(Moment, #state.get_fsm_time, State),
      {Puts, PutMean, {PutMedian, PutNF, PutNN, PutH}} =
          slide_minute(Moment, #state.put_fsm_time, State),
      [{node_gets, Gets},
       {node_get_fsm_time_mean, GetMean},
       {node_get_fsm_time_median, GetMedian},
       {node_get_fsm_time_95, GetNF},
       {node_get_fsm_time_99, GetNN},
       {node_get_fsm_time_100, GetH},
       {node_puts, Puts},
       {node_put_fsm_time_mean, PutMean},
       {node_put_fsm_time_median, PutMedian},
       {node_put_fsm_time_95, PutNF},
  
negative.code: 
  %% @spec update(Stat::term(), integer(), state()) -> state()
  %% @doc Update the given stat in State, returning a new State.
  update(vnode_get, Moment, State=#state{vnode_gets_total=VGT}) ->
      spiral_incr(#state.vnode_gets, Moment, State#state{vnode_gets_total=VGT+1});
  update(vnode_put, Moment, State=#state{vnode_puts_total=VPT}) ->
      spiral_incr(#state.vnode_puts, Moment, State#state{vnode_puts_total=VPT+1});
  update({get_fsm_time, Microsecs}, Moment, State=#state{node_gets_total=NGT}) ->
      slide_incr(#state.get_fsm_time, Microsecs, Moment, State#state{node_gets_total=NGT+1});
  update({put_fsm_time, Microsecs}, Moment, State=#state{node_puts_total=NPT}) ->
      slide_incr(#state.put_fsm_time, Microsecs, Moment, State#state{node_puts_total=NPT+1});
  update(_, _, State) ->
      State.
  
  