anchor.diff:                          end
                   end,
       filelib:fold_files(Dir, ".*.erl", false, CompileFn, ok).
  +
  +run_pre_hook() ->
  +    run_hook(basho_bench_config:get(pre_hook, no_op)).
  +
  +run_post_hook() ->
  +    run_hook(basho_bench_config:get(post_hook, no_op)).
  +
  +run_hook({Module, Function}) ->
  +    Module:Function();
  +
  +run_hook(no_op) ->
  +    no_op.
  +
  
positive.code: wait_for_stop(Mref, infinity) ->
      receive
          {'DOWN', Mref, _, _, Info} ->
              ?CONSOLE("Test stopped: ~p\n", [Info])
      end;
  wait_for_stop(Mref, DurationMins) ->
      Duration = timer:minutes(DurationMins) + timer:seconds(1),
      receive
          {'DOWN', Mref, _, _, Info} ->
              ?CONSOLE("Test stopped: ~p\n", [Info]);
          {shutdown, Reason, Exit} ->
              basho_bench_app:stop(),
              ?CONSOLE("Test shutdown: ~s~n", [Reason]),
              halt(Exit)
  
      after Duration ->
              basho_bench_app:stop(),
              ?CONSOLE("Test completed after ~p mins.\n", [DurationMins])
      end.
  
negative.code: 
      log_dimensions(),
  
      %% Run pre_hook for user code preconditions
      run_pre_hook(),
  
      %% Spin up the application
      ok = basho_bench_app:start(),
  
  