anchor.diff:       {<<"query_avg_result_count">>, QueryAvgResultCount}];
   computed_stats_lazy_proplist("@index-"++_) ->
       [];
  +computed_stats_lazy_proplist("@goxdcr-"++BucketName) ->
  +    Z2 = fun (StatNameA, StatNameB, Combiner) ->
  +                 {Combiner, [StatNameA, StatNameB]}
  +         end,
  +    %% compute a list of per replication XDC stats
  +    Reps = case cluster_compat_mode:is_goxdcr_enabled() of
  +               true ->
  +                   goxdcr_rest:get_replications(BucketName);
  +               false ->
  +                   []
  +           end,
  +    lists:flatmap(fun (Id) ->
  +                          Prefix = <<"replications/", Id/binary,"/">>,
  +
  +                          PercentCompleteness = Z2(<<Prefix/binary, "docs_checked">>,
  +                                                   <<Prefix/binary, "changes_left">>,
  +                                                   fun (Checked, Left) ->
  +                                                           try (100 * Checked) / (Checked + Left)
  +                                                           catch error:badarith -> 0
  +                                                           end
  +                                                   end),
  +
  +                          [{<<Prefix/binary, "percent_completeness">>, PercentCompleteness}]
  +                  end,
  +                  Reps);
   computed_stats_lazy_proplist(BucketName) ->
       Z2 = fun (StatNameA, StatNameB, Combiner) ->
                    {Combiner, [StatNameA, StatNameB]}
  
positive.code:     SS = grab_ui_stats("@system", Nodes, HaveStamp, Wnd),
      MaybeQStats = case HaveQuery of
                        false ->
                            [];
                        true ->
                            QS = grab_ui_stats("@query", Nodes, HaveStamp, Wnd),
                            [{<<"@query">>, {QS}}]
                    end,
      INodes = bucket_nodes("@index-" ++ Bucket),
      HaveIndexBool  = case Nodes of
  
negative.code:     ns_cluster_membership:n1ql_active_nodes(ns_config:latest_config_marker());
  bucket_nodes("@index-"++_) ->
      ns_cluster_membership:index_active_nodes(ns_config:latest_config_marker());
  bucket_nodes("@goxdcr-"++Bucket) ->
      ns_bucket:live_bucket_nodes(Bucket);
  bucket_nodes(Bucket) ->
      ns_bucket:live_bucket_nodes(Bucket).
  
  is_persistent("@query") ->
      false;
  is_persistent("@index-"++_) ->
      false;
  is_persistent("@goxdcr-"++_) ->
      false;
  is_persistent(BucketName) ->
      ns_bucket:is_persistent(BucketName).
  