anchor.diff:  %%% Internal functions
   %%--------------------------------------------------------------------
   
  +%% @spec update(Stat::term(), integer(), state()) -> state()
  +%% @doc Update the given stat in State, returning a new State.
   update(vnode_get, Moment, State) ->
       spiral_incr(#state.vnode_gets, Moment, State);
   update(vnode_put, Moment, State) ->
  
positive.code:     end,
      gen_server2:start_link({local, ?MODULE}, ?MODULE, [], []).
  
  get_stats() ->
      gen_server2:call(?MODULE, get_stats).
  
  update(Stat) ->
      gen_server2:cast(?MODULE, {update, Stat, riak_util:moment()}).
  
  %%====================================================================
  %% gen_server callbacks
  %%====================================================================
  
  %%--------------------------------------------------------------------
  %% Function: init(Args) -> {ok, State} |
  %%                         {ok, State, Timeout} |
  %%                         ignore               |
  %%                         {stop, Reason}
  %% Description: Initiates the server
  %%--------------------------------------------------------------------
  init([]) ->
      {ok, #state{vnode_gets=spiraltime:fresh(),
                  vnode_puts=spiraltime:fresh(),
                  get_fsm_time=slide:fresh(),
                  put_fsm_time=slide:fresh()}}.
  
  %%--------------------------------------------------------------------
  %% Function: %% handle_call(Request, From, State) -> {reply, Reply, State} |
  %%                                      {reply, Reply, State, Timeout} |
  %%                                      {noreply, State} |
  %%                                      {noreply, State, Timeout} |
  %%                                      {stop, Reason, Reply, State} |
  %%                                      {stop, Reason, State}
  %% Description: Handling call messages
  %%--------------------------------------------------------------------
  handle_call(get_stats, _From, State) ->
      {reply, produce_stats(State), State};
  handle_call(_Request, _From, State) ->
      Reply = ok,
      {reply, Reply, State}.
  
  %%--------------------------------------------------------------------
  %% Function: handle_cast(Msg, State) -> {noreply, State} |
  %%                                      {noreply, State, Timeout} |
  %%                                      {stop, Reason, State}
  %% Description: Handling cast messages
  %%--------------------------------------------------------------------
  handle_cast({update, Stat, Moment}, State) ->
      {noreply, update(Stat, Moment, State)};
  handle_cast(_Msg, State) ->
      {noreply, State}.
  
  %%--------------------------------------------------------------------
  %% Function: handle_info(Info, State) -> {noreply, State} |
  %%                                       {noreply, State, Timeout} |
  %%                                       {stop, Reason, State}
  %% Description: Handling all non call/cast messages
  %%--------------------------------------------------------------------
  handle_info(_Info, State) ->
      {noreply, State}.
  
  %%--------------------------------------------------------------------
  %% Function: terminate(Reason, State) -> void()
  %% Description: This function is called by a gen_server when it is about to
  %% terminate. It should be the opposite of Module:init/1 and do any necessary
  %% cleaning up. When it returns, the gen_server terminates with Reason.
  %% The return value is ignored.
  %%--------------------------------------------------------------------
  terminate(_Reason, _State) ->
      ok.
  
  %%--------------------------------------------------------------------
  %% Func: code_change(OldVsn, State, Extra) -> {ok, NewState}
  %% Description: Convert process state when code is changed
  %%--------------------------------------------------------------------
  code_change(_OldVsn, State, _Extra) ->
      {ok, State}.
  
  
negative.code: -record(state,{vnode_gets,vnode_puts,
                 get_fsm_time,put_fsm_time}).
  
  %% @spec start_link() -> {ok,Pid} | ignore | {error,Error}
  %% @doc Start the server.  Also start the os_mon application, if it's
  %%      not already running.
  start_link() ->
      case application:start(os_mon) of
          ok -> ok;
  