anchor.diff:  %% ===================================================================
   %% Internal functions
   %% ===================================================================
  +
  +get_folder(FoldFun, Acc, KeyCount) ->
  +    fun() ->
  +            fold_anything_fun(FoldFun, Acc, KeyCount)
  +    end.
  +
  +key_of_integer(Range, State) ->
  +    {N, S} = random:uniform_s(Range, State),
  +    Key = integer_to_list(N) ++ ".1000", %% e.g. "10.1000"
  +    BKey = list_to_binary(Key),          %% e.g. <<"10.1000">>
  +    {BKey, S}.
  +
  +value_for_random(VR, Size) ->
  +    <<VR:(Size*8)>>.
  +
  +fold_anything_fun(FoldFunc, Acc, KeyCount) ->
  +    Range = 1000000,
  +    KeyState = random:seed0(),
  +    ValueState = random:seed0(),
  +    all_keys_folder(FoldFunc, Acc, Range, {KeyState, ValueState}, KeyCount).
  +
  +all_keys_folder(FoldFunc, Acc, _Range, _S, 0) ->
  +    FoldFunc(undefined, 0, Acc);
  +all_keys_folder(FoldFunc, Acc, Range, {KS,VS}, N) ->
  +    {Key,KSS} = key_of_integer(Range, KS),
  +    {VR,VSS} = random:uniform_s(255,VS),
  +    Acc1 = FoldFunc(Key, VR, Acc),
  +    all_keys_folder(FoldFunc, Acc1, Range, {KSS,VSS}, N-1).
  +
  +%% @private
  +%% Return a function to fold over keys on this backend
  +fold_keys_fun(FoldKeysFun, Bucket) ->
  +    fun(Key, _VR, Acc) when Key /= undefined ->
  +            FoldKeysFun(Bucket, Key, Acc);
  +       (_, _, Acc) ->
  +            Acc
  +    end.
  +
  +%% @private
  +%% Return a function to fold over keys on this backend
  +fold_objects_fun(FoldObjectsFun, Bucket, Size) ->
  +    fun(Key, VR, Acc) when Key /= undefined ->
  +            Value = value_for_random(VR, Size),
  +            FoldObjectsFun(Bucket, Key, Value, Acc);
  +       (_, _, Acc) ->
  +            Acc
  +    end.
  +
  +%% borrowed from kv get_fsm...
  +make_vtag(Now) ->
  +    <<HashAsNum:128/integer>> = crypto:md5(term_to_binary({node(), Now})),
  +    riak_core_util:integer_to_list(HashAsNum,62).
   
   get_binsize(<<"yessir.", Rest/binary>>) ->
       get_binsize(Rest, 0);
  
positive.code:     DefaultLen = case app_helper:get_prop_or_env(
                          default_size, Config, yessir_backend) of
                       undefined -> 1024;
                       N         -> N
                   end,
      {ok, #state{default_get = <<42:(DefaultLen*8)>>}}.
  
  %% @doc Stop this backend, yes, sir!
  -spec stop(state()) -> ok.
  
negative.code:                 any(),
                  [{atom(), term()}],
                  state()) -> {ok, term()}.
  fold_keys(FoldKeysFun, Accum, Opts, State) ->
      KeyCount = State#state.key_count,
      BucketOpt = lists:keyfind(bucket, 1, Opts),
      Folder = case BucketOpt of
                   {bucket, Bucket} ->
                       FoldFun = fold_keys_fun(FoldKeysFun, Bucket),
                       get_folder(FoldFun, Accum, KeyCount);
                   _ ->
                       FoldFun = fold_keys_fun(FoldKeysFun, <<"all">>),
                       get_folder(FoldFun, Accum, KeyCount)
               end,
      case lists:member(async_fold, Opts) of
          true ->
              {async, Folder};
          false ->
              {ok, Folder()}
      end.
  
  %% @doc Fold over all the objects for one or all buckets, yes, sir!
  -spec fold_objects(riak_kv_backend:fold_objects_fun(),
                     any(),
                     [{atom(), term()}],
                     state()) -> {ok, any()} | {async, fun()}.
  fold_objects(FoldObjectsFun, Accum, Opts, State) ->
      KeyCount = State#state.key_count,
      ValueSize = State#state.default_size,
      BucketOpt = lists:keyfind(bucket, 1, Opts),
      Folder = case BucketOpt of
                   {bucket, Bucket} ->
                       FoldFun = fold_objects_fun(FoldObjectsFun, Bucket, ValueSize),
                       get_folder(FoldFun, Accum, KeyCount);
                   _ ->
                       FoldFun = fold_objects_fun(FoldObjectsFun, <<"all">>, ValueSize),
                       get_folder(FoldFun, Accum, KeyCount)
               end,
      case lists:member(async_fold, Opts) of
          true ->
              {async, Folder};
          false ->
              {ok, Folder()}
      end.
  
  %% @doc Delete all objects from this backend, yes, sir!
  -spec drop(state()) -> {ok, state()}.
  