anchor.diff:  %% ====================================================================
   %% Internal functions
   %% ====================================================================
  +
  +%% Uses the process dictionary to memoize checks
  +%% for checking if we're running in distributed mode
  +%% as constantly checking in with a centralized gen_server
  +%% would impede progress
  +
  +get_distributed() ->
  +    case erlang:get(distribute_work) of
  +        undefined ->
  +            DistributeWork = basho_bench_config:get(distribute_work, false),
  +            erlang:put(distribute_work, DistributeWork),
  +            DistributeWork;
  +        DistributeWork ->
  +            DistributeWork
  +    end.
   
   op_csv_file({Label, _Op}) ->
       Fname = normalize_label(Label) ++ "_latencies.csv",
  
positive.code:     increment_error_counter({Op, Reason}),
      {reply, ok, State#state { errors_since_last_report = true }}.
  
  handle_cast({Op, {ok, Units}, ElapsedUs}, State) ->
      folsom_metrics:notify({latencies, Op}, ElapsedUs),
      folsom_metrics:notify({units, Op}, {inc, Units}),
      {noreply, State};
  handle_cast(_, State) ->
      {noreply, State}.
  
  
negative.code:     op_complete(Op, {ok, 1}, ElapsedUs);
  op_complete(Op, {ok, Units}, ElapsedUs) ->
      %% Update the histogram and units counter for the op in question
     % io:format("Get distributed: ~p~n", [get_distributed()]),
      case get_distributed() of
          true ->
              gen_server:cast({global, ?MODULE}, {Op, {ok, Units}, ElapsedUs});
          false ->
              folsom_metrics:notify({latencies, Op}, ElapsedUs),
              folsom_metrics:notify({units, Op}, {inc, Units})
      end,
      ok;
  op_complete(Op, Result, ElapsedUs) ->
      gen_server:call({global, ?MODULE}, {op, Op, Result, ElapsedUs}).
  