anchor.diff:                    end, []).
   
   
  -grab_op_stats(Bucket, Nodes, Params) ->
  +grab_aggregate_op_stats(Bucket, Nodes, Params) ->
  +    {MainSamples, Replies, ClientTStamp, {Step, _, Window}} = gather_op_stats(Bucket, Nodes, Params),
  +    RV = lists:foldl(fun ({Node, _}, AccSamples) when Node =:= node() -> AccSamples;
  +                         ({_Node, RemoteSamples}, AccSamples) ->
  +                             merge_samples_normally(AccSamples, RemoteSamples)
  +                     end, MainSamples, Replies),
  +    V = lists:reverse(RV),
  +    case V =/= [] andalso (hd(V))#stat_entry.timestamp of
  +        ClientTStamp -> {V, ClientTStamp, Step, Window};
  +        _ -> {V, undefined, Step, Window}
  +    end.
  +
  +gather_op_stats(Bucket, Nodes, Params) ->
       ClientTStamp = case proplists:get_value("haveTStamp", Params) of
                          undefined -> undefined;
                          X -> try list_to_integer(X) of
  
positive.code: handle_overview_stats(PoolId, Req) ->
      Names = lists:sort(menelaus_web_buckets:all_accessible_bucket_names(PoolId, Req)),
      AllSamples = lists:map(fun (Name) ->
                                     element(1, grab_op_stats(Name, all, [{"zoom", "hour"}]))
                             end, Names),
      MergedSamples = case AllSamples of
                          [FirstBucketSamples | RestSamples] ->
  
negative.code:                                      all -> ns_bucket:live_bucket_nodes(Bucket);
                                       [_] -> []
                                   end,
                      Replies = invoke_archiver(Bucket, OtherNodes, PeriodParams),
                      {MainSamples, Replies, ClientTStamp, PeriodParams}
              end
      end.
  
  