anchor.diff:      Stats;
   set([{K, V} | L], Stats) ->
       NS = case K of
  -             session_id -> Stats#rr_recon_stats{ session_id = V };
  -             tree_size -> Stats#rr_recon_stats{ tree_size = V };
  -             tree_compareLeft -> Stats#rr_recon_stats{ tree_compareLeft = V };
  -             tree_nodesCompared -> Stats#rr_recon_stats { tree_nodesCompared = V };
  -             tree_leafsSynced -> Stats#rr_recon_stats{ tree_leafsSynced = V };
  -             tree_compareSkipped -> Stats#rr_recon_stats{ tree_compareSkipped = V };
  -             error_count -> Stats#rr_recon_stats{ error_count = V };
  -             build_time -> Stats#rr_recon_stats{ build_time = V };
  -             recon_time -> Stats#rr_recon_stats{ recon_time = V };             
  -             resolve_started -> Stats#rr_recon_stats{ resolve_started = V };
  -             status -> Stats#rr_recon_stats{ status = V }
  +             session_id          -> Stats#rr_recon_stats{session_id = V};
  +             tree_size           -> Stats#rr_recon_stats{tree_size = V};
  +             tree_compareLeft    -> Stats#rr_recon_stats{tree_compareLeft = V};
  +             tree_nodesCompared  -> Stats#rr_recon_stats{tree_nodesCompared = V};
  +             tree_leafsSynced    -> Stats#rr_recon_stats{tree_leafsSynced = V};
  +             tree_compareSkipped -> Stats#rr_recon_stats{tree_compareSkipped = V};
  +             error_count         -> Stats#rr_recon_stats{error_count = V};
  +             build_time          -> Stats#rr_recon_stats{build_time = V};
  +             recon_time          -> Stats#rr_recon_stats{recon_time = V};
  +             resolve_started     -> Stats#rr_recon_stats{resolve_started = V};
  +             status              -> Stats#rr_recon_stats{status = V}
            end,
       set(L, NS).
   
  
positive.code:          (recon_time, stats())         -> non_neg_integer();
           (resolve_started, stats())    -> non_neg_integer();
           (status, stats())             -> status().
  get(K, Stats) ->
      case K of
          session_id -> Stats#rr_recon_stats.session_id;
          tree_size -> Stats#rr_recon_stats.tree_size;
          tree_compareLeft -> Stats#rr_recon_stats.tree_compareLeft;
          tree_nodesCompared -> Stats#rr_recon_stats.tree_nodesCompared;
          tree_leafsSynced -> Stats#rr_recon_stats.tree_leafsSynced;
          tree_compareSkipped -> Stats#rr_recon_stats.tree_compareSkipped;
          error_count -> Stats#rr_recon_stats.error_count;
          build_time -> Stats#rr_recon_stats.build_time;
          recon_time -> Stats#rr_recon_stats.recon_time;
          resolve_started -> Stats#rr_recon_stats.resolve_started;
          status -> Stats#rr_recon_stats.status
      end.
  
  -spec merge(stats(), stats()) -> stats().
  merge(A, #rr_recon_stats{ tree_size = TS,
  
negative.code:     Stats;
  inc([{K, V} | L], Stats) ->
      NS = case K of
               tree_size ->
                   Stats#rr_recon_stats{tree_size = V};
               tree_compareLeft ->
                   X = V + Stats#rr_recon_stats.tree_compareLeft,
                   Stats#rr_recon_stats{tree_compareLeft = X};
               tree_nodesCompared ->
                   X = V + Stats#rr_recon_stats.tree_nodesCompared,
                   Stats#rr_recon_stats {tree_nodesCompared = X};
               tree_leafsSynced ->
                   X = V + Stats#rr_recon_stats.tree_leafsSynced,
                   Stats#rr_recon_stats{tree_leafsSynced = X};
               tree_compareSkipped ->
                   X = V + Stats#rr_recon_stats.tree_compareSkipped,
                   Stats#rr_recon_stats{tree_compareSkipped = X};
               error_count ->
                   X = V + Stats#rr_recon_stats.error_count,
                   Stats#rr_recon_stats{error_count = X};
               build_time ->
                   X = V + Stats#rr_recon_stats.build_time,
                   Stats#rr_recon_stats{build_time = X};
               recon_time ->
                   X = V + Stats#rr_recon_stats.recon_time,
                   Stats#rr_recon_stats{recon_time = X};
               resolve_started ->
                   X = V + Stats#rr_recon_stats.resolve_started,
                   Stats#rr_recon_stats{resolve_started = X}
           end,
      inc(L, NS).
  
  