anchor.diff:  -behaviour(gen_server).
   
   %% API
  --export([start_link/0, start_prof/1, stop_prof/1, stats/1, averages/0]).
  +-export([start_link/0, start_prof/1, stop_prof/1, stats/1, averages/0, balance_prof/0]).
   
   %% gen_server callbacks
   -export([init/1, handle_call/3, handle_cast/2, handle_info/2,
            terminate/2, code_change/3]).
   
  --record(state, {ets}).
  +-record(state, {ets,balance}).
   
   -record(profile, {name, count, sum}).
   
  
positive.code: %% @doc Handling cast messages
  %% @end 
  %%--------------------------------------------------------------------
  handle_cast({start, Pid, Id, Time}, State = #state{ets=Ets}) ->
    put({Pid,Id}, Time),
    {noreply, State};
  
negative.code:     
  stats(Id) ->
    gen_server:call(dynomite_prof, {stats, Id}).
    
  balance_prof() ->
    gen_server:cast(dynomite_prof, {balance, self(), lib_misc:now_float()}).
    
  start_prof(Id) ->
    gen_server:cast(dynomite_prof, {start, self(), Id, lib_misc:now_float()}).
  