anchor.diff:                                 end
                          end),
   
  +    PercentCompleteness = Z2(replication_docs_checked, replication_changes_left,
  +                       fun (Checked, Left) ->
  +                               try (100 * Checked) / (Checked + Left)
  +                               catch error:badarith -> 0
  +                               end
  +                       end),
  +
       [{couch_total_disk_size, TotalDisk},
        {couch_docs_fragmentation, DocsFragmentation},
        {couch_views_fragmentation, ViewsFragmentation},
  
positive.code:                                           {desc,<<"Weighted average latency in ms of sending getMeta and waiting for conflict solution result from remote cluster">>}]},
                                   {struct,[{title,<<"ms doc ops latency">>},
                                            {name,<<"replication_wtavg_docs_latency">>},
                                            {desc,<<"Weighted average latency in ms of sending replicated mutations to remote cluster">>}]}]}]}
                end, Reps).
  
  couchbase_view_stats_descriptions(BucketId) ->
  
negative.code:      {avg_disk_commit_time, AverageCommitTime},
       {avg_bg_wait_time, AverageBgWait},
       {replication_wtavg_meta_latency, WtAvgMetaLatency},
       {replication_wtavg_docs_latency, WtAvgDocsLatency},
       {replication_percent_completeness, PercentCompleteness}].
  
  %% converts list of samples to proplist of stat values.
  %%
  