Permalink
Browse files

PULSE annotations to support bwf-pool-race branch of riak_core

The worker_pool_pulse.erl test in riak_core needs poolboy to be compiled with PULSE annotations. This commit provides those.
  • Loading branch information...
1 parent 0e15b5d commit efe0f8ac3a7032cbd9cf6341dfeda2faa788f994 Bryan Fink committed Apr 11, 2013
Showing with 16 additions and 0 deletions.
  1. +7 −0 src/poolboy.erl
  2. +5 −0 src/poolboy_sup.erl
  3. +4 −0 src/poolboy_worker.erl
View
@@ -9,6 +9,13 @@
-export([init/1, ready/2, ready/3, overflow/2, overflow/3, full/2, full/3,
handle_event/3, handle_sync_event/4, handle_info/3, terminate/3,
code_change/4]).
+-ifdef(PULSE).
+-compile(export_all).
+-compile({parse_transform, pulse_instrument}).
+-compile({pulse_replace_module, [{gen_fsm, pulse_gen_fsm},
+ {gen_server, pulse_gen_server},
+ {supervisor, pulse_supervisor}]}).
+-endif.
-define(TIMEOUT, 5000).
View
@@ -4,6 +4,11 @@
-behaviour(supervisor).
-export([start_link/2, init/1]).
+-ifdef(PULSE).
+-compile(export_all).
+-compile({parse_transform, pulse_instrument}).
+-compile({pulse_replace_module, [{supervisor, pulse_supervisor}]}).
+-endif.
start_link(Mod, Args) ->
supervisor:start_link(?MODULE, {Mod, Args}).
View
@@ -3,6 +3,10 @@
-module(poolboy_worker).
-export([behaviour_info/1]).
+-ifdef(PULSE).
+-compile(export_all).
+-compile({parse_transform, pulse_instrument}).
+-endif.
behaviour_info(callbacks) ->
[{start_link, 1}];

0 comments on commit efe0f8a

Please sign in to comment.