anchor.diff:      {_, ChangesLeft} = lists:keyfind(changes_left, 1, RawTask),
       {_, DocsChecked} = lists:keyfind(docs_checked, 1, RawTask),
       {_, DocsWritten} = lists:keyfind(docs_written, 1, RawTask),
  -    {_, DataReplicated} = lists:keyfind(data_replicated, 1, RawTask),
  -    {_, ActiveVbReps} = lists:keyfind(active_vbreps, 1, RawTask),
  -    {_, WaitingVbReps} = lists:keyfind(waiting_vbreps, 1, RawTask),
  -    {_, TimeWorking} = lists:keyfind(time_working, 1, RawTask),
  -    {_, TimeCommitting} = lists:keyfind(time_committing, 1, RawTask),
  -    {_, NumCheckpoints} = lists:keyfind(num_checkpoints, 1, RawTask),
  -    {_, DocsRepQueue} = lists:keyfind(docs_rep_queue, 1, RawTask),
  -    {_, SizeRepQueue} = lists:keyfind(size_rep_queue, 1, RawTask),
       Errors = proplists:get_value(errors, RawTask, []),
       {_, Id} = lists:keyfind(id, 1, RawTask),
  -    [{{XDCR, Id}, {ChangesLeft, DocsChecked, DocsWritten, DataReplicated,
  -                   ActiveVbReps, WaitingVbReps, TimeWorking, TimeCommitting,
  -                   NumCheckpoints, DocsRepQueue, SizeRepQueue, Errors}}];
  +    [{{XDCR, Id}, {ChangesLeft, DocsChecked, DocsWritten, Errors}}];
   task_operation(extract, _, _) ->
       ignore;
   
  
positive.code:      {changesLeft, ChangesLeft},
       {docsChecked, DocsChecked},
       {docsWritten, DocsWritten},
       {dataReplicated, DataReplicated},
       {activeVbreps, ActiveVbReps},
       {waitingVbreps, WaitingVbReps},
       {timeWorking, TimeWorking},
       {timeCommitting, TimeCommitting},
       {numCheckpoints, NumCheckpoints},
       {docsRepQueue, DocsRepQueue},
       {sizeRepQueue, SizeRepQueue},
       {errors, OutputErrors}].
  
  
  
negative.code:                {ChangesDone2, TotalChanges2}) ->
      {ChangesDone1 + ChangesDone2, TotalChanges1 + TotalChanges2};
  task_operation(fold, {xdcr, _},
                {ChangesLeft1, DocsChecked1, DocsWritten1, Errors1},
                {ChangesLeft2, DocsChecked2, DocsWritten2, Errors2}) ->
      {ChangesLeft1 + ChangesLeft2,
       DocsChecked1 + DocsChecked2,
       DocsWritten1 + DocsWritten2,
       [Errors1 | Errors2]}.
  
  
  