anchor.diff:  generate_test_data(0, _, _, A) -> A;
     
   generate_test_data(N, Key, Size, A) ->
  -  generate_test_data(N-1, lib_misc:succ(Key), Size, array:set(N-1, {Key, new_bytes(Size)}, A)).
  +  ets:insert(A, {N, Key, new_bytes(Size)}),
  +  generate_test_data(N-1, lib_misc:succ(Key), Size, A).
     
   duplicate(N, E) ->
     duplicate(N, E, []).
  
positive.code: #!/usr/bin/env escript
  %% -*- erlang -*-
  %%! +K true +A 128 +P 60000 -smp enable -sname benchmark -pa ./ebin -pa ./deps/thrift/ebin
  -mode(compile).
  
  -record(config, {hosts=[],concurrency=20,ratio=0.5,logdir="bench_log",size=100,keyspace=100000,method=thrift}).
  
  main(Options) ->
    code:add_pathsa(["./ebin", "./deps/thrift/ebin"]),
    process_flag(trap_exit, true),
    case parse_options(Options) of
  
negative.code:     {ok, Type} -> file:write(File, io_lib:format("~p\t~s\t~p\t~s\t~s~n", [End, Type, End - Start, Key, Host]));
      {'EXIT', _} -> file:write(File, io_lib:format("~p\terror\t~p\t~s\t~s~n", [End, End - Start, Key, Host]))
    end,
    worker_loop(Method, Client, File, Data, Ratio, Host, Keyspace).
  
  call_server(rpc, Rand, Ratio, Host, Key, Value) when Rand < Ratio ->
    case rpc:call(Host, mediator, put, [Key, {self(), undefined}, Value]) of
      {badrpc, Reason} -> {'EXIT', Reason};
      Res -> {ok, "put"}
    end;
    
  call_server(rpc, _, _, Host, Key, _) ->
    case rpc:call(Host, mediator, get, [Key]) of
      {badrpc, Reason} -> {'EXIT', Reason};
      Res -> {ok, "get"}
    end;
  
  call_server(thrift, Rand, Ratio, Client, Key, Value) when Rand < Ratio ->
    dynomite_thrift_client:put(Client, Key, undefined, Value),
  