anchor.diff:      end.
   
   
  -sequential_int_generator(Ref, MaxValue, Id) ->
  +sequential_int_generator(Ref, MaxValue, Id, DisableProgress) ->
      %% A bit of evil here. We want to generate numbers in sequence and stop
      %% at MaxKey. This means we need state in our anonymous function. Use the process
      %% dictionary to keep track of where we are.
      case erlang:get({sigen, Ref}) of
          undefined ->
              seq_gen_put(Ref, seq_gen_read_resume_value(Id)),
  -           sequential_int_generator(Ref, MaxValue, Id);
  +           sequential_int_generator(Ref, MaxValue, Id, DisableProgress);
          MaxValue ->
              throw({stop, empty_keygen});
          Value ->
              case Value rem 500 of
  -               0 -> ok = seq_gen_write_resume_value(Id, Value);
  -               _ -> ok
  +               400 -> ok = seq_gen_write_resume_value(Id, Value);
  +                 _ -> ok
              end,
  -           case Value rem 5000 of
  -               0 ->
  -                   ?DEBUG("sequential_int_gen: ~p (~w%)\n", [Value, trunc(100 * (Value / MaxValue))]);
  -               _ ->
  +           case (not DisableProgress) andalso Value rem 5000 == 0 of
  +               true ->
  +                   Me = self(),
  +                   spawn(fun() -> ?DEBUG("sequential_int_gen: ~p: ~p (~w%)\n", [Me, Value, trunc(100 * (Value / MaxValue))]) end);
  +               false ->
                      ok
              end,
              seq_gen_put(Ref, Value+1),
  
positive.code:     MinValue = StartKey + Range * (Id - 1),
      MaxValue = StartKey + Range * Id,
      Ref = make_ref(),
      ?DEBUG("ID ~p generating range ~p to ~p\n", [Id, MinValue, MaxValue]),
      fun() -> sequential_int_generator(Ref, Range, Id) + MinValue end;
  new({uniform_int, MaxKey}, _Id) ->
      fun() -> random:uniform(MaxKey) end;
  new({pareto_int, MaxKey}, _Id) ->
  
negative.code:     fun() -> list_to_binary(io_lib:format(FmtStr, [Gen()])) end;
  new({sequential_int, MaxKey}, Id) ->
      Ref = make_ref(),
      DisableProgress =
          basho_bench_config:get(disable_sequential_int_progress_report, false),
      fun() -> sequential_int_generator(Ref, MaxKey, Id, DisableProgress) end;
  new({partitioned_sequential_int, MaxKey}, Id) ->
      new({partitioned_sequential_int, 0, MaxKey}, Id);
  new({partitioned_sequential_int, StartKey, NumKeys}, Id) ->
  