Skip to content

Instantly share code, notes, and snippets.

@cmeiklejohn
Created February 28, 2014 19:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cmeiklejohn/9278115 to your computer and use it in GitHub Desktop.
Save cmeiklejohn/9278115 to your computer and use it in GitHub Desktop.
-module(riak_repl_aae_source_intercepts).
-compile(export_all).
-include("intercept.hrl").
-define(M, riak_repl_aae_source_orig).
%% @doc Introduce 10ms of latency in receiving message off of the
%% socket.
delayed_get_reply(State) ->
io:format("delayed~n"),
?I_INFO("delayed~n"),
timer:sleep(10),
?M:get_reply_orig(State).
%% @doc Introduce 100ms of latency in receiving message off of the
%% socket.
really_delayed_get_reply(State) ->
io:format("really delayed~n"),
?I_INFO("really delayed~n"),
timer:sleep(100),
?M:get_reply_orig(State).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment