anchor.diff:  -export_type([stats/0]).
   -endif.
   
  --type option()   :: feedback_response |
  -                    {feedback_request, comm:mypid()} |
  +-type option()   :: {feedback_request, comm:mypid()} |
                       {send_stats, comm:mypid()} | %send stats to pid after completion
                       {session_id, rrepair:session_id()} |
                       {from_my_node, 0 | 1}.
  
positive.code: -include("scalaris.hrl").
  
  -export([init/1, on/2, start/0]).
  -export([get_stats_session_id/1, get_stats_feedback/1, merge_stats/2]).
  -export([print_resolve_stats/1]).
  
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  
negative.code: -spec get_stats_session_id(stats()) -> rrepair:session_id() | null.
  get_stats_session_id(Stats) -> Stats#resolve_stats.session_id.
  
  %% @doc merges two stats records with identical session_id, otherwise error will be raised
  -spec merge_stats(stats(), stats()) -> stats() | error.
  merge_stats(#resolve_stats{ session_id = ASID,
                              diff_size = ADiff,
                              regen_count = ARC,
                              regen_fail_count = AFC,
                              upd_fail_count = AUFC,
                              update_count = AUC },
              #resolve_stats{ session_id = BSID,
                              diff_size = BDiff,
                              regen_count = BRC,
                              regen_fail_count = BFC,
                              upd_fail_count = BUFC,
  