anchor.diff:              end
       end.
   
  -do_put(Host, Url, Headers, Value) ->
  +do_put(Host, Url, Headers, Value, ReportFun) ->
       case send_request(Host, Url, Headers ++ [{'Content-Type', 'application/octet-stream'}],
                         put, Value, proxy_opts()) of
           {ok, "201", _Header, _Body} ->
  -            ok;
  +            {ok, ReportFun(byte_size(Value))};
           {ok, "204", _Header, _Body} ->
  -            ok;
  +            {ok, ReportFun(byte_size(Value))};
           {ok, Code, _Header, _Body} ->
               {error, {http_error, Code}};
           {error, Reason} ->
  
positive.code:         {Error, Reason} ->
              {Error, Reason, S2}
      end;
  run(get, KeyGen, _ValueGen, #state{bucket = Bucket} = State) ->
      {NextHost, S2} = next_host(State),
      {Host, Port} = NextHost,
      Key = KeyGen(),
      Url = url(Host, Port, Bucket, Key),
      case do_get({Host, Port}, Url, []) of
          ok ->
              {ok, S2};
          {Error, Reason} ->
              {Error, Reason, S2}
      end;
  run(_Operation, _KeyGen, _ValueGen, State) ->
      {ok, State}.
  
  %% ====================================================================
  %% Internal functions
  %% ====================================================================
  
  insert(KeyGen, ValueGen, {Host, Port}, Bucket) ->
      Key = KeyGen(),
      Url = url(Host, Port, Bucket, Key),
      Value = ValueGen(),
      do_put({Host, Port}, Url, [], Value).
  
  url(Host, Port, Bucket, Key) ->
      UnparsedUrl = lists:concat(["http://", Host, ":", Port, "/", Bucket, "/", Key]),
  
negative.code:     Disconnect = basho_bench_config:get(moss_disconnect_frequency, infinity),
      erlang:put(disconnect_freq, Disconnect),
  
      %% Get our measurement units: op/sec, KByte/Sec, MByte/Sec
      {RF_name, ReportFun} =
          case (catch basho_bench_config:get(moss_measurement_units)) of
              N = byte_sec  -> {N,      fun(X) -> X end};
              N = kbyte_sec -> {N,      fun(X) -> X / 1024 end};
              N = mbyte_sec -> {N,      fun(X) -> X / (1024 * 1024) end};
              _             -> {op_sec, fun(_) -> 1 end}
          end,
      basho_bench_log:log(info, "Reporting factor = ~p\n", [RF_name]),
  
      Hosts = [{Ip, Port}],
  
      {ok, #state{client_id=ID, hosts=Hosts,
                  bucket = basho_bench_config:get(moss_bucket, "test"),
                  report_fun = ReportFun}}.
  
  -spec run(atom(), fun(), fun(), term()) -> {{ok, integer()}, term()} | {error, term(), term()}.
  run(insert, KeyGen, ValueGen, #state{bucket = Bucket,
                                       report_fun = ReportFun} = State) ->
      {NextHost, S2} = next_host(State),
      ConnInfo = NextHost,
      case insert(KeyGen, ValueGen, ConnInfo, Bucket, ReportFun) of
          {ok, _Size} = Good ->
              {Good, S2};
          {Error, Reason} ->
              {Error, Reason, S2}
      end;
  run(update, KeyGen, ValueGen, #state{bucket = Bucket,
                                       report_fun = ReportFun} = State) ->
      {NextHost, S2} = next_host(State),
      {Host, Port} = NextHost,
      Key = KeyGen(),
      Url = url(Host, Port, Bucket, Key),
      case do_get({Host, Port}, Url, [], ReportFun) of
          {ok, _} ->
              case insert(KeyGen, ValueGen, {Host, Port}, Bucket, ReportFun) of
                  {ok, _Size} = Good ->
                      {Good, State};
                  {Error, Reason} ->
                      {Error, Reason, S2}
              end;
  